]> git.donarmstrong.com Git - lilypond.git/commitdiff
MusicXML: Rename build files to indicate they are for musicxml
authorReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 22 Mar 2008 08:02:51 +0000 (09:02 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 22 Mar 2008 08:02:51 +0000 (09:02 +0100)
buildscripts/generate_intervals.py [deleted file]
buildscripts/generate_keys.py [deleted file]
buildscripts/generate_timesignatures.py [deleted file]
buildscripts/musicxml_generate_intervals.py [new file with mode: 0755]
buildscripts/musicxml_generate_keys.py [new file with mode: 0755]
buildscripts/musicxml_generate_timesignatures.py [new file with mode: 0755]

diff --git a/buildscripts/generate_intervals.py b/buildscripts/generate_intervals.py
deleted file mode 100755 (executable)
index dbde2bc..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python
-
-notes = "CDEFGAB"
-alterations = [-1, 0, 1]
-
-def print_note (octave, note, alteration):
-    print "      <note>\n        <pitch>\n          <step>%s</step>" % notes[note]
-    if alteration <> 0:
-        print "          <alter>%s</alter>" % alteration
-    print "          <octave>%s</octave>\n        </pitch>\n        <duration>1</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>" % octave
-
-
-print """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
-                                "http://www.musicxml.org/dtds/partwise.dtd">
-<score-partwise>
-  <movement-title>Various piches and interval sizes</movement-title>
-  <part-list>
-    <score-part id="P1">
-      <part-name>MusicXML Part</part-name>
-    </score-part>
-  </part-list>
-  <!--=========================================================-->
-  <part id="P1">
-    <measure number="1">
-      <attributes>
-        <divisions>1</divisions>
-        <key>
-          <fifths>0</fifths>
-          <mode>major</mode>
-        </key>
-        <time symbol="common">
-          <beats>2</beats>
-          <beat-type>4</beat-type>
-        </time>
-        <clef>
-          <sign>G</sign>
-          <line>2</line>
-        </clef>
-      </attributes>
-"""
-
-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 """    </measure>
-  </part>
-</score-partwise>
-"""
\ No newline at end of file
diff --git a/buildscripts/generate_keys.py b/buildscripts/generate_keys.py
deleted file mode 100755 (executable)
index cd0f995..0000000
+++ /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 """    <measure number="%s">
-      <attributes>
-%s        <key>
-          <fifths>%s</fifths>
-          <mode>%s</mode>
-        </key>
-      </attributes>
-      <note>
-        <pitch>
-          <step>C</step>
-          <octave>4</octave>
-        </pitch>
-        <duration>2</duration>
-        <voice>1</voice>
-        <type>half</type>
-      </note>
-%s    </measure>""" % (nr, atts,  fifth, mode, final)
-
-first_atts = """        <divisions>1</divisions>
-        <time symbol="common">
-          <beats>2</beats>
-          <beat-type>4</beat-type>
-        </time>
-        <clef>
-          <sign>G</sign>
-          <line>2</line>
-        </clef>
-"""
-
-final_barline = """      <barline location="right">
-        <bar-style>light-heavy</bar-style>
-      </barline>
-"""
-
-print """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
-                                "http://www.musicxml.org/dtds/partwise.dtd">
-<score-partwise>
-  <movement-title>Different Key signatures</movement-title>
-  <part-list>
-    <score-part id="P1">
-      <part-name>MusicXML Part</part-name>
-    </score-part>
-  </part-list>
-  <!--=========================================================-->
-  <part id="P1">
-"""
-
-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 """  </part>
-</score-partwise>
-"""
\ No newline at end of file
diff --git a/buildscripts/generate_timesignatures.py b/buildscripts/generate_timesignatures.py
deleted file mode 100755 (executable)
index 9844f3d..0000000
+++ /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 """    <measure number="%s">
-      <attributes>
-%s        <time %s>
-          <beats>%s</beats>
-          <beat-type>%s</beat-type>
-        </time>
-      </attributes>
-      <note>
-        <pitch>
-          <step>C</step>
-          <octave>5</octave>
-        </pitch>
-        <duration>1</duration>
-        <voice>1</voice>
-        <type>quarter</type>
-      </note>
-%s    </measure>""" % (nr, attr, params, beats, type, barline)
-
-first_atts = """        <divisions>1</divisions>
-        <key>
-          <fifths>0</fifths>
-          <mode>major</mode>
-        </key>
-        <time symbol="common">
-          <beats>2</beats>
-          <beat-type>4</beat-type>
-        </time>
-        <clef>
-          <sign>G</sign>
-          <line>2</line>
-        </clef>
-"""
-
-final_barline = """      <barline location="right">
-        <bar-style>light-heavy</bar-style>
-      </barline>
-"""
-
-print """<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
-                                "http://www.musicxml.org/dtds/partwise.dtd">
-<score-partwise>
-  <movement-title>Different time signatures</movement-title>
-  <part-list>
-    <score-part id="P1">
-      <part-name>MusicXML Part</part-name>
-    </score-part>
-  </part-list>
-  <!--=========================================================-->
-  <part id="P1">
-"""
-
-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 """  </part>
-</score-partwise>
-"""
\ No newline at end of file
diff --git a/buildscripts/musicxml_generate_intervals.py b/buildscripts/musicxml_generate_intervals.py
new file mode 100755 (executable)
index 0000000..dbde2bc
--- /dev/null
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+
+notes = "CDEFGAB"
+alterations = [-1, 0, 1]
+
+def print_note (octave, note, alteration):
+    print "      <note>\n        <pitch>\n          <step>%s</step>" % notes[note]
+    if alteration <> 0:
+        print "          <alter>%s</alter>" % alteration
+    print "          <octave>%s</octave>\n        </pitch>\n        <duration>1</duration>\n        <voice>1</voice>\n        <type>quarter</type>\n      </note>" % octave
+
+
+print """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
+                                "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise>
+  <movement-title>Various piches and interval sizes</movement-title>
+  <part-list>
+    <score-part id="P1">
+      <part-name>MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+    <measure number="1">
+      <attributes>
+        <divisions>1</divisions>
+        <key>
+          <fifths>0</fifths>
+          <mode>major</mode>
+        </key>
+        <time symbol="common">
+          <beats>2</beats>
+          <beat-type>4</beat-type>
+        </time>
+        <clef>
+          <sign>G</sign>
+          <line>2</line>
+        </clef>
+      </attributes>
+"""
+
+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 """    </measure>
+  </part>
+</score-partwise>
+"""
\ No newline at end of file
diff --git a/buildscripts/musicxml_generate_keys.py b/buildscripts/musicxml_generate_keys.py
new file mode 100755 (executable)
index 0000000..cd0f995
--- /dev/null
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+
+notes = "CDEFGAB"
+alterations = [-1, 0, 1]
+
+def print_measure (nr, fifth, mode, atts = "", final = ""):
+    print """    <measure number="%s">
+      <attributes>
+%s        <key>
+          <fifths>%s</fifths>
+          <mode>%s</mode>
+        </key>
+      </attributes>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>4</octave>
+        </pitch>
+        <duration>2</duration>
+        <voice>1</voice>
+        <type>half</type>
+      </note>
+%s    </measure>""" % (nr, atts,  fifth, mode, final)
+
+first_atts = """        <divisions>1</divisions>
+        <time symbol="common">
+          <beats>2</beats>
+          <beat-type>4</beat-type>
+        </time>
+        <clef>
+          <sign>G</sign>
+          <line>2</line>
+        </clef>
+"""
+
+final_barline = """      <barline location="right">
+        <bar-style>light-heavy</bar-style>
+      </barline>
+"""
+
+print """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
+                                "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise>
+  <movement-title>Different Key signatures</movement-title>
+  <part-list>
+    <score-part id="P1">
+      <part-name>MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+"""
+
+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 """  </part>
+</score-partwise>
+"""
\ No newline at end of file
diff --git a/buildscripts/musicxml_generate_timesignatures.py b/buildscripts/musicxml_generate_timesignatures.py
new file mode 100755 (executable)
index 0000000..9844f3d
--- /dev/null
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+
+notes = "CDEFGAB"
+alterations = [-1, 0, 1]
+
+def print_measure (nr, beats, type, params = "", attr = "", barline = ""):
+    print """    <measure number="%s">
+      <attributes>
+%s        <time %s>
+          <beats>%s</beats>
+          <beat-type>%s</beat-type>
+        </time>
+      </attributes>
+      <note>
+        <pitch>
+          <step>C</step>
+          <octave>5</octave>
+        </pitch>
+        <duration>1</duration>
+        <voice>1</voice>
+        <type>quarter</type>
+      </note>
+%s    </measure>""" % (nr, attr, params, beats, type, barline)
+
+first_atts = """        <divisions>1</divisions>
+        <key>
+          <fifths>0</fifths>
+          <mode>major</mode>
+        </key>
+        <time symbol="common">
+          <beats>2</beats>
+          <beat-type>4</beat-type>
+        </time>
+        <clef>
+          <sign>G</sign>
+          <line>2</line>
+        </clef>
+"""
+
+final_barline = """      <barline location="right">
+        <bar-style>light-heavy</bar-style>
+      </barline>
+"""
+
+print """<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 1.0 Partwise//EN"
+                                "http://www.musicxml.org/dtds/partwise.dtd">
+<score-partwise>
+  <movement-title>Different time signatures</movement-title>
+  <part-list>
+    <score-part id="P1">
+      <part-name>MusicXML Part</part-name>
+    </score-part>
+  </part-list>
+  <!--=========================================================-->
+  <part id="P1">
+"""
+
+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 """  </part>
+</score-partwise>
+"""
\ No newline at end of file