spiffyscore
Check-in [bf135b5321]
Not logged in
Overview
SHA1 Hash:bf135b5321a32d06a8953b74eafbd80e84af8b4f
Date: 2011-11-27 02:26:33
User: brian
Comment:Fixed a bug that prevented sharps and flats from working
Timelines: family | ancestors | descendants | both | develop
Other Links: files | file ages | manifest
Tags And Properties
Changes
hide diffs side-by-side diffs patch

Modified parse.py from [ce9611a745d5caf1] to [4cca2f3d0c7e0841].

120 120 note.syncopate = p[2] 121 121 122 122 123 123 def p_accidental(p): 124 124 '''note : ACCIDENTAL note 125 125 ''' 126 126 if p[1] == "^": 127 - p[0] = p[2].value + 1 127 + p[2].value += 1 128 128 else: 129 - p[0] = p[2].value - 1 129 + p[2].value -= 1 130 + p[0] = p[2] 130 131 131 132 def p_octave(p): 132 133 '''note : note OCTAVE 133 134 ''' 134 135 count = len(p[2]) 135 136 increment_or_decrement = 1 if p[2].startswith("'") else -1 136 137 p[1].octave += (count * increment_or_decrement)

Modified spiffyscore.py from [58892e1cd4aafbfb] to [8b19298d3ab14b1f].

17 17 random.seed(time.time()) 18 18 mymidi = midifile(15) 19 19 20 20 def main(): 21 21 composition = { 22 22 "intro": { 23 23 "body": { 24 - "pan_flute": { # Instrument 'melody' 24 + "percusion": { 25 + "channel": 14, 26 + "octave": 4, 27 + "duration": 60, 28 + "grammars": { 29 + "u": ["A ^A (u)"] 30 + } 31 + }, 32 + "pan_flute": { 25 33 "channel": 8, 26 34 "octave": 5, 27 35 "duration": 60, 28 36 "grammars": { # Notes for this instrument to use in this piece 29 37 "u": ["C2' B2 | A3 D3 || B | C' | D | C2' C2' | z | (u)", "C2' C2' | C2' C2' | (x)"], 30 38 "v": ["G2 F2 | E2 F2 | D5 (u)", "B/4 C/4' B/4 A/4 | D2 D2 | z | (u)"], 31 39 "x": ["z4 | (v)"],