def __init__(self, key=None, time=None, melody='', fingering=None): TinyNotationStream.__init__(self, melody, time) if key is not None: self.insert(0, Key(key)) if fingering is not None: for (note_index, finger) in fingering: self.notes[note_index].fingering = finger
def createEasyScale(): myScale = "d8 e f g a b" time1 = TimeSignature("3/4") s1 = TinyNotationStream(myScale, time1) # s1.timeSignature = time1 # s1.showTimeSignature = True s1.show('lily.png')
def createSleep(): section = "A1 r4 G G G8 F G2 G c2 c8 c c B c2 c" s1 = TinyNotationStream(section) s1.clef = music21.clef.Treble8vbClef() # lS1 = LilyString("\\score { {" + s1.lily + "} \\layout {} \\midi {} }") lS1 = LilyString(s1.lily) #print lS1.value lS1.showPNGandPlayMIDI()
def createEasyScale(): myScale = "d8 e f g a b" time1 = TimeSignature("3/4") s1 = TinyNotationStream(myScale, time1) s1.insert(0, time1) # s1.timeSignature = time1 # s1.showTimeSignature = True print(s1.lily) lS1 = LilyString("{" + s1.lily.value + "}") lS1.showPDF()
def createSleep(): section = "A1 r4 G G G8 F G2 G c2 c8 c c B c2 c" s1 = TinyNotationStream(section) s1.clef = music21.clef.Treble8vbClef() s1.show('lily.png') s1.show('midi')
def createOrphee(): '''section = measures from Orphee, Act I, no. 1, m.15 by Gluck tempo = moderato, timeSig = cut time random = randomly generated melody from rolling dice. ''' random = " g4 b-8 b-16 b- b-32 b- b-64 e- r32 r8 r4" random2 = " g4 a-8 a-8 d'-16 b16 a-16 c'16 c'4 c'8 g8 e-8 f8 f4 a-4" random3 = " f4 g4. a8 a4. d'8 b4 a4 c'4 r4 c'4. c'8 g8 e-8 f4 f4 a-2." section = "g4 g2 c'4 c'2 b4 b8 c' c'2. g4 a-2 g4 " section += random3 s1 = TinyNotationStream(section) s1.show('lily.png') s1.show('midi')
def major3rd(): myScale = "a-2 c'2" s1 = TinyNotationStream(myScale) s1.show('lily.png') s1.show('midi')
def capuaReg3(): myScale = "a4 f g r r r r a f# g2" s1 = TinyNotationStream(myScale) s1.show('lily.png') s1.show('midi')
def capuaReg2(): myScale = "d4 e f g r r r r d e f# g2" s1 = TinyNotationStream(myScale) s1.show('lily.png') s1.show('midi')
def capuaReg1(): myScale = "g4 f4 g4 r4 r2 g4 f#4 g2" s1 = TinyNotationStream(myScale) s1.show('lily.png') s1.show('midi')
def badMeter(): myScale = "a2 a2" time1 = TimeSignature("3/4") s1 = TinyNotationStream(myScale, time1) s1.show('lily.png') s1.show('midi')