Added new repeat syntax

Shortened syntax for repeats:
1:5 (1,5):4 (1 2 3):4
This commit is contained in:
2023-02-24 16:16:24 +02:00
parent bcc86f4cfe
commit 595fc346ae
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
// Root for the rules
?root: sequence -> start
sequence: (pitch_class | assignment | variable | rest | dur_change | oct_mod | oct_change | WS | chord | named_roman | cycle | random_integer | random_pitch | random_percent | range | list | repeated_list | lisp_operation | list_op | subdivision | eval | euclid | repeat)*
sequence: (pitch_class | repeat_item | assignment | variable | rest | dur_change | oct_mod | oct_change | WS | chord | named_roman | cycle | random_integer | random_pitch | random_percent | range | list | repeated_list | lisp_operation | list_op | subdivision | eval | euclid | repeat)*
// Pitch classes
pitch_class: prefix* pitch
@ -42,6 +42,7 @@
// Repeats
repeat: "[:" sequence ":" [number] "]"
repeat_item: (pitch_class | list | random_integer) ":" number
// List
list: prefix* "(" sequence ")"