diff --git a/Music/AmazingGrace.abc b/Music/AmazingGrace.abc new file mode 100644 index 0000000..5ebb126 --- /dev/null +++ b/Music/AmazingGrace.abc @@ -0,0 +1,34 @@ +X: 1 +T: Amazing Grace +Q: "English Waltz " 87 +C: Traditional +M: 3/4 % time signature +L: 1/4 % default length +%%staves {RH LH} +V: RH clef=treble +%%MIDI channel 4 +%%MIDI program 1 4 % Klavier +%%MIDI gchordoff +% +V: LH clef=bass +%%MIDI channel 3 +%%MIDI program 1 3 % Klavier +%%MIDI gchordoff +% +K: F % key signature +% +[V: RH] z2 +1+C/+3+F/ |: "F"F2 A/F/ | A2 G | +w: A_ma-zing_ grace, how +[V: LH] z3 |: +1+F,,3 | +5+F,3 | +% +[V: RH] "Bb"F2 +2+D | "F"C2 C/+2+F/ | +1+F2 A/G/ | A2 c | "C7"(c3 | +w: sweet the sound that_ saved a_ wretch like me! +[V: LH] +3+B,,3 | +5+F,3 | +1+F,,3 | +5+F,3 | +4+(C,3 | +% +[V: RH] c2) A/c/ | "F"c2 A/F/ | "F7"+5+A2 G | "Bb"F2 +2+D | +w: _ I_ once was_ lost, but now I'm +[V: LH] C,3) | +1+F,,3 | +5+F,3 | +3+B,,3 | +% +[V: RH] "F"C2 C/+3+F/ | F2 A/F/ | "C7"A2 G |[1 "F"(F3 | F2) +1+C/+3+F/ :|2 "F"(F3 | F2) |] +w: found, Was_ blind, but_ now I see._ * * * * +[V: LH] +1+F,,3 | +5+F,3 | +3+C,3 |[1 +1+(F,,3 | F,,3) :|2 +1+(F,,3 | F,,2) |] diff --git a/Music/AmazingGrace.mma b/Music/AmazingGrace.mma index e89daed..24d97a3 100644 --- a/Music/AmazingGrace.mma +++ b/Music/AmazingGrace.mma @@ -9,13 +9,16 @@ Begin Solo-Left End Tempo 87 +Groove Metronome3 +z + Groove countrywaltz2 Beatadjust 2 -midiInc file=AmazingGracePiano.mid Solo-Right=4 Solo-Left=3 Volume=80 +midiInc file=AmazingGraceMid.solo.mid Solo-Right=4 Solo-Left=3 Volume=80 Beatadjust -2 -1 z! +1 z Repeat diff --git a/Music/FrereJacques.abc b/Music/FrereJacques.abc index 98149a1..1c59250 100644 --- a/Music/FrereJacques.abc +++ b/Music/FrereJacques.abc @@ -13,7 +13,7 @@ V: LH1 clef=bass %%MIDI gchordoff % [V: RH1] |: CDEC | CDEC | EFG2 | EFG2 | -[V: LH1] |: E4, | E4, | C4, | C4, | +[V: LH1] |: E,4 | E,4 | C,4 | C,4 | [V: RH1] G/2A/2G/2F/2 EC | G/2A/2G/2F/2 EC | Cz C2 | Cz C2 :| -[V: LH1] E4, | E4, | zG,z2 | zG,z2 :| - +[V: LH1] E,4 | E,4 | zG,z2 | zG,z2 :| +% diff --git a/Music/Greensleeves.abc b/Music/Greensleeves.abc index 1b69a93..fa10398 100755 --- a/Music/Greensleeves.abc +++ b/Music/Greensleeves.abc @@ -1,6 +1,6 @@ X:1 -T:Greensleeves Simplified +T:Greensleeves M:3/4 L:1/4 Q: "Allegro" 1/4 = 130 % tempo diff --git a/Music/ScarboroughFair.abc b/Music/ScarboroughFair.abc index 95a94df..76f2496 100755 --- a/Music/ScarboroughFair.abc +++ b/Music/ScarboroughFair.abc @@ -9,9 +9,17 @@ V: RH1 clef=treble %%MIDI channel 4 %%MIDI program 1 4 %%MIDI gchordoff +V: LH1 clef=bass +%%MIDI channel 3 +%%MIDI program 1 3 +%%MIDI gchordoff % [V: RH1] |: D2D | A2A | E3/2F/E | D3 | zAc | +[V: LH1] |: z3 | z3 | z3 | z3 | z3 | [V: RH1] d2c | ABG | A3- | Azd | d2d | +[V: LH1] z3 | z3 | z3 | z3 | z3 | [V: RH1] c2A | AGF | E/C/-C2 |-C3 | +[V: LH1] z3 | z3 | z3 | z3 | [V: RH1] D2A | G2F | EDC | D3- | D3 :| -%%MIDI program 25 +[V: LH1] z3 | z3 | z3 | z3 | z3 :| +% diff --git a/Music/makeall b/Music/makeall index 4516fc7..57f6e57 100755 --- a/Music/makeall +++ b/Music/makeall @@ -4,10 +4,12 @@ SONGS=" SkipToMyLoo Greensleeves ScarboroughFair + FrereJacques + AmazingGrace " # bash for loop for s in $SONGS; do - ./makemusic $s - ./makescore $s + ./makemusic2 $s + #./makescore $s done diff --git a/Music/makemusic b/Music/makemusic index fe2783c..29782bd 100755 --- a/Music/makemusic +++ b/Music/makemusic @@ -1,13 +1,125 @@ -#!/bin/bash -#rename to makemusic.bat to run on windows +#!/usr/bin/env python +import os +import sys -# create the output dir if does not exist -[ -a PianoBoosterMusic ] || mkdir "PianoBoosterMusic" +class songDetails: -# from abc plus -echo make music with $1 -abc2midi $1.abc -o ${1}.solo.mid -RS + def createMusic(self, no): # create music -# from Musical MIDI Accompaniment -mma $1.mma -f PianoBoosterMusic/${1}.mid + self.nName = "%02d-%s"%(no, self.name) + + inputFile = self.name + if os.path.isfile(inputFile + "Mid.abc"): + inputFile += "Mid" + print "inputFile " + inputFile + + # http://moinejf.free.fr/ (abcplus.sourceforge.net) + cmd = "abc2midi %s.abc -o %s.solo.mid -RS" % (inputFile, self.name) + print cmd + if os.system(cmd) != 0: + return False + + # http://mellowood.ca/mma/ + cmd = "/home/louis/active/src/mma/mma-current/mma.py %s.mma -f MusicFiles/%s.mid" % (self.name, self.nName) + print cmd + if os.system(cmd) != 0: + return False + + inputFile = self.name + if os.path.isfile(inputFile + "Ps.abc"): + inputFile += "Ps" + print "inputFile " + inputFile + + # http://abc.sourceforge.net/ (abcplus.sourceforge.net) + cmd = "abcm2ps -s 0.8 -c %s.abc -O MusicFiles/%s.ps" % (inputFile, self.name) + print cmd + if os.system(cmd) != 0: + return False + + # http://www.ghostscript.com/ - ps2pdf is part of ghostscript + cmd = "ps2pdf MusicFiles/%s.ps MusicFiles/%s.pdf" % ( self.name, self.nName) + print cmd + if os.system(cmd) != 0: + return False + os.remove("MusicFiles/%s.ps" % self.name) + + + cmd = "abcm2ps -E -s 1.0 -c %s.abc -O MusicFiles/%s.ps" % (inputFile, self.name) + print cmd + if os.system(cmd) != 0: + return False + + + + + # from imagemagick + cmd = "convert -density 90x90 -alpha off MusicFiles/%s001.eps MusicFiles/%s.png" % (self.name, self.nName) + print cmd + if os.system(cmd) != 0: + return False + + os.remove("MusicFiles/%s001.eps" % self.name) + + os.system("cp {0}.abc MusicSource".format(self.name)) + os.system("cp {0}.mma MusicSource".format(self.name)) + + f = open( 'music.html', 'a') + str = """ +
+ +
+
+ Piano Music - {0}
+ Download the MIDI file {1}.mid
+ and the pdf {1}.pdf
+ (This music was generated from the {0}.abc
+ and the MMA file {0}.mma )
+
+ All the music on this page is available here + PianoBoosterMusic.zip . + This free sheet music can be used for beginner piano lessons with PianoBooster. +
+ + + + + + + +