45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
t_BASENOTE = r"[A-Ga-g]"
# t_BASENOTE = r"I+V?|VI*|i+v?|vi*"
t_ACCIDENTAL = r"\^{1}|_{1}|="
t_REST = r"z"
t_OCTAVE = r"'+|,+"
t_CHORD_TYPE = r"m|7|m7|0|o|\+|mb5|sus|sus4|maj7|mmaj7|7sus4|dim|dim7|7b5|m7b5|6|b6|m6|mb6|46|maj9|9|add9|7b9|m9"
t_PAREN = "\(|\)"
t_SYNCOPATE = "\+|-"
t_NODE = r"\([a-zA-Z0-9_-]+\)"
def t_NOTE_LENGTH(t):
r"/?\d+"
multiplier = float(t.value.strip("/"))
if t.value.startswith("/"):
|
|
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
t_BASENOTE = r"[A-Ga-g]"
# t_BASENOTE = r"I+V?|VI*|i+v?|vi*"
t_ACCIDENTAL = r"\^{1}|_{1}|="
t_REST = r"z"
t_OCTAVE = r"'+|,+"
t_CHORD_TYPE = r"m|7|m7|0|o|\+|mb5|sus|sus4|maj7|mmaj7|7sus4|dim|dim7|7b5|m7b5|6|b6|m6|mb6|46|maj9|9|add9|7b9|m9"
t_PAREN = "\[|\]"
t_SYNCOPATE = "\+|-"
t_NODE = r"\([a-zA-Z0-9_-]+\)"
def t_NOTE_LENGTH(t):
r"/?\d+"
multiplier = float(t.value.strip("/"))
if t.value.startswith("/"):
|