#!/usr/bin/env python notes = "CDEFGAB" alterations = [-1, 0, 1] def print_measure (nr, fifth, mode, atts1 = "", atts = "", final = ""): print """ %s %s %s %s C 4 2 1 half %s """ % (nr, atts1, fifth, mode, atts, final) first_div = """ 1 """ first_atts = """ G 2 """ final_barline = """ light-heavy """ print """ Different Key signatures Various key signature: from 11 flats to 11 sharps (each one first one measure in major, then one measure in minor) MusicXML Part """ max_range = 11 measure = 0 for fifth in range(-max_range, max_range+1): measure += 1 if fifth == -max_range: print_measure (measure, fifth, "major", first_div, first_atts) else: print_measure (measure, fifth, "major") measure += 1 if fifth == max_range: print_measure (measure, fifth, "minor", "", "", final_barline) else: print_measure (measure, fifth, "minor") print """ """