From: Han-Wen Nienhuys Date: Thu, 13 Dec 2007 01:08:08 +0000 (-0200) Subject: Move *.py musicxml regression test files to buildscripts/ X-Git-Tag: release/2.11.36-1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=211a8a49442e07e4171ee0ad640cbf253ac11d52;p=lilypond.git Move *.py musicxml regression test files to buildscripts/ --- diff --git a/buildscripts/generate_intervals.py b/buildscripts/generate_intervals.py new file mode 100755 index 0000000000..dbde2bcee7 --- /dev/null +++ b/buildscripts/generate_intervals.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +notes = "CDEFGAB" +alterations = [-1, 0, 1] + +def print_note (octave, note, alteration): + print " \n \n %s" % notes[note] + if alteration <> 0: + print " %s" % alteration + print " %s\n \n 1\n 1\n quarter\n " % octave + + +print """ + + + Various piches and interval sizes + + + MusicXML Part + + + + + + + 1 + + 0 + major + + + + G + 2 + + +""" + +start_octave = 5 + +for octave in (start_octave, start_octave+1): + for note in (0,1,2,3,4,5,6): + for alteration in alterations: + if octave == start_octave and note == 0 and alteration == -1: + continue + print_note (octave, note, alteration) +# if octave == start_octave and note == 0 and alteration == 0: +# continue + print_note (start_octave-(octave-start_octave)-(1-(7-note)/7), (7-note)%7, -alteration) + +print """ + + +""" \ No newline at end of file diff --git a/buildscripts/generate_keys.py b/buildscripts/generate_keys.py new file mode 100755 index 0000000000..cd0f99529f --- /dev/null +++ b/buildscripts/generate_keys.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python + +notes = "CDEFGAB" +alterations = [-1, 0, 1] + +def print_measure (nr, fifth, mode, atts = "", final = ""): + print """ + +%s + %s + %s + + + + + C + 4 + + 2 + 1 + half + +%s """ % (nr, atts, fifth, mode, final) + +first_atts = """ 1 + + + G + 2 + +""" + +final_barline = """ + light-heavy + +""" + +print """ + + + Different Key signatures + + + 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_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 """ + +""" \ No newline at end of file diff --git a/buildscripts/generate_timesignatures.py b/buildscripts/generate_timesignatures.py new file mode 100755 index 0000000000..9844f3d0f6 --- /dev/null +++ b/buildscripts/generate_timesignatures.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python + +notes = "CDEFGAB" +alterations = [-1, 0, 1] + +def print_measure (nr, beats, type, params = "", attr = "", barline = ""): + print """ + +%s + + + + C + 5 + + 1 + 1 + quarter + +%s """ % (nr, attr, params, beats, type, barline) + +first_atts = """ 1 + + 0 + major + + + + G + 2 + +""" + +final_barline = """ + light-heavy + +""" + +print """ + + + Different time signatures + + + MusicXML Part + + + + +""" + +measure = 1 + +print_measure (measure, 2, 2, " symbol=\"common\"", first_atts) +measure += 1 + +print_measure (measure, 4, 4, " symbol=\"common\"") +measure += 1 + +print_measure (measure, 2, 2) +measure += 1 + +print_measure (measure, 3, 2) +measure += 1 + +print_measure (measure, 2, 4) +measure += 1 + +print_measure (measure, 3, 4) +measure += 1 + +print_measure (measure, 4, 4) +measure += 1 + +print_measure (measure, 5, 4) +measure += 1 + +print_measure (measure, 3, 8) +measure += 1 + +print_measure (measure, 6, 8) +measure += 1 + +print_measure (measure, 12, 8, "", "", final_barline) +measure += 1 + +print """ + +""" \ No newline at end of file diff --git a/input/regression/musicxml/generate_intervals.py b/input/regression/musicxml/generate_intervals.py deleted file mode 100755 index dbde2bcee7..0000000000 --- a/input/regression/musicxml/generate_intervals.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python - -notes = "CDEFGAB" -alterations = [-1, 0, 1] - -def print_note (octave, note, alteration): - print " \n \n %s" % notes[note] - if alteration <> 0: - print " %s" % alteration - print " %s\n \n 1\n 1\n quarter\n " % octave - - -print """ - - - Various piches and interval sizes - - - MusicXML Part - - - - - - - 1 - - 0 - major - - - - G - 2 - - -""" - -start_octave = 5 - -for octave in (start_octave, start_octave+1): - for note in (0,1,2,3,4,5,6): - for alteration in alterations: - if octave == start_octave and note == 0 and alteration == -1: - continue - print_note (octave, note, alteration) -# if octave == start_octave and note == 0 and alteration == 0: -# continue - print_note (start_octave-(octave-start_octave)-(1-(7-note)/7), (7-note)%7, -alteration) - -print """ - - -""" \ No newline at end of file diff --git a/input/regression/musicxml/generate_keys.py b/input/regression/musicxml/generate_keys.py deleted file mode 100755 index cd0f99529f..0000000000 --- a/input/regression/musicxml/generate_keys.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python - -notes = "CDEFGAB" -alterations = [-1, 0, 1] - -def print_measure (nr, fifth, mode, atts = "", final = ""): - print """ - -%s - %s - %s - - - - - C - 4 - - 2 - 1 - half - -%s """ % (nr, atts, fifth, mode, final) - -first_atts = """ 1 - - - G - 2 - -""" - -final_barline = """ - light-heavy - -""" - -print """ - - - Different Key signatures - - - 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_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 """ - -""" \ No newline at end of file diff --git a/input/regression/musicxml/generate_timesignatures.py b/input/regression/musicxml/generate_timesignatures.py deleted file mode 100755 index 9844f3d0f6..0000000000 --- a/input/regression/musicxml/generate_timesignatures.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python - -notes = "CDEFGAB" -alterations = [-1, 0, 1] - -def print_measure (nr, beats, type, params = "", attr = "", barline = ""): - print """ - -%s - - - - C - 5 - - 1 - 1 - quarter - -%s """ % (nr, attr, params, beats, type, barline) - -first_atts = """ 1 - - 0 - major - - - - G - 2 - -""" - -final_barline = """ - light-heavy - -""" - -print """ - - - Different time signatures - - - MusicXML Part - - - - -""" - -measure = 1 - -print_measure (measure, 2, 2, " symbol=\"common\"", first_atts) -measure += 1 - -print_measure (measure, 4, 4, " symbol=\"common\"") -measure += 1 - -print_measure (measure, 2, 2) -measure += 1 - -print_measure (measure, 3, 2) -measure += 1 - -print_measure (measure, 2, 4) -measure += 1 - -print_measure (measure, 3, 4) -measure += 1 - -print_measure (measure, 4, 4) -measure += 1 - -print_measure (measure, 5, 4) -measure += 1 - -print_measure (measure, 3, 8) -measure += 1 - -print_measure (measure, 6, 8) -measure += 1 - -print_measure (measure, 12, 8, "", "", final_barline) -measure += 1 - -print """ - -""" \ No newline at end of file