Skip to content

Instantly share code, notes, and snippets.

@raffazizzi
Last active August 29, 2015 14:16
Show Gist options
  • Save raffazizzi/9ac03df0866738836e49 to your computer and use it in GitHub Desktop.
Save raffazizzi/9ac03df0866738836e49 to your computer and use it in GitHub Desktop.
EMA selection grammar
start ::= "start"
startOrEnd ::= "start" | "end"
all ::= "all"
measure ::= integer
measureRange ::= {measure | startOrEnd | all / ","} | {measure | start, "-", measure | end / ","}
staff ::= integer
staffRange ::= {staff | startOrEnd | all / "+"} | {staff | start, "-", staff | end / "+"}
stavesToMeasure ::= {staffRange / ","}
beat ::= float
beatRange ::= {"@", beat | startOrEnd | all / "+"} | {"@", beat | start, "-", beat | end / "+"}
beatstoMeasure ::= {beatRange / ","}
selection ::= measureRange, "/", stavesToMeasure, "/", beatstoMeasure

Some examples

Three measures, exclude first staff in second measure. 1-3/all,2-end,all/@all

Three measures, second staff plus fourth staff for measure 1. First, second and forth beat in measure 1 staff 1. First two beats in measure 1 staff 4 All content of second staff for measures 2 and 3 1-3/2+4,2,2/@1-2@4+@1-2,@all,@all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment