Added repeat item to subdivisions
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -166,6 +166,7 @@ cython_debug/
|
|||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
# Debugging files
|
# Debugging files
|
||||||
|
debug/
|
||||||
debug*.py
|
debug*.py
|
||||||
test.py
|
test.py
|
||||||
|
|
||||||
|
|||||||
@ -230,7 +230,7 @@ class ZiffersTransformer(Transformer):
|
|||||||
"""Parse subdivision"""
|
"""Parse subdivision"""
|
||||||
values = flatten(items[0])
|
values = flatten(items[0])
|
||||||
return Subdivision(
|
return Subdivision(
|
||||||
values=values, text="[" + "".join([val.text for val in values]) + "]"
|
values=values, wrap_start="[", wrap_end="]"
|
||||||
)
|
)
|
||||||
|
|
||||||
def subitems(self, items):
|
def subitems(self, items):
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
modifier: /[#b]/
|
modifier: /[#b]/
|
||||||
|
|
||||||
// Variable assignment
|
// Variable assignment
|
||||||
assignment: variable ass_op (list | pitch_class | random_integer | random_pitch | cycle | list_op)
|
assignment: variable ass_op (list | pitch_class | random_integer | random_pitch | cycle | list_op | repeat_item)
|
||||||
ass_op: /[=~]/
|
ass_op: /[=~]/
|
||||||
variable: /[A-Z]/
|
variable: /[A-Z]/
|
||||||
|
|
||||||
@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
// Subdivision
|
// Subdivision
|
||||||
subdivision: "[" subitems "]"
|
subdivision: "[" subitems "]"
|
||||||
subitems: (pitch_class | random_integer | random_pitch | rest | oct_mod | oct_change | WS | chord | named_roman | cycle | subdivision | list | list_op | range)*
|
subitems: (pitch_class | random_integer | random_pitch | rest | oct_mod | oct_change | WS | chord | named_roman | cycle | subdivision | list | list_op | range | repeat_item)*
|
||||||
|
|
||||||
// Control characters modifying future events
|
// Control characters modifying future events
|
||||||
oct_mod: octave WS
|
oct_mod: octave WS
|
||||||
|
|||||||
Reference in New Issue
Block a user