Differences From Artifact [bcac1af73f46f95c]:
- Executable file
parse.py
- 2011-11-15 22:08:44 - part of checkin [befd61cab9] on branch feature/midi - Successfully got the program to output a MIDI file instead of a csound score (user: brian) [annotate]
- 2011-11-15 22:09:21 - part of checkin [0c3fb3e27f] on branch develop - Replaced csound support with midi support (user: brian) [annotate]
- 2011-11-16 00:14:47 - part of checkin [872ae93059] on branch develop - If I move from csound to midi I should actually rename function with 'csound' in the name (user: brian) [annotate]
To Artifact [ce9611a745d5caf1]:
- File
parse.py
- 2011-11-27 02:03:54 - part of checkin [821ac3e4d6] on branch develop - Added a volume offset parameter to each instrument. Fixed a bug that kept instruments from always being rendered, and one that broke midi files. (user: brian) [annotate]
45 45
46 t_BASENOTE = r"[A-Ga-g]" 46 t_BASENOTE = r"[A-Ga-g]"
47 # t_BASENOTE = r"I+V?|VI*|i+v?|vi*" 47 # t_BASENOTE = r"I+V?|VI*|i+v?|vi*"
48 t_ACCIDENTAL = r"\^{1}|_{1}|=" 48 t_ACCIDENTAL = r"\^{1}|_{1}|="
49 t_REST = r"z" 49 t_REST = r"z"
50 t_OCTAVE = r"'+|,+" 50 t_OCTAVE = r"'+|,+"
51 t_CHORD_TYPE = r"m|7|m7|0|o|\+|mb5|sus|sus4|maj7|mmaj7|7sus4|dim|dim7|7b5|m7 51 t_CHORD_TYPE = r"m|7|m7|0|o|\+|mb5|sus|sus4|maj7|mmaj7|7sus4|dim|dim7|7b5|m7
52 t_PAREN = "\(|\)" | 52 t_PAREN = "\[|\]"
53 t_SYNCOPATE = "\+|-" 53 t_SYNCOPATE = "\+|-"
54 t_NODE = r"\([a-zA-Z0-9_-]+\)" 54 t_NODE = r"\([a-zA-Z0-9_-]+\)"
55 55
56 def t_NOTE_LENGTH(t): 56 def t_NOTE_LENGTH(t):
57 r"/?\d+" 57 r"/?\d+"
58 multiplier = float(t.value.strip("/")) 58 multiplier = float(t.value.strip("/"))
59 if t.value.startswith("/"): 59 if t.value.startswith("/"):