implement "?" operator in minilanguage (for degradeBy)
this will require update to krill-parser.js (aggregated in later commit) to work properly
This commit is contained in:
parent
8244ba7754
commit
964ee68974
2 changed files with 6 additions and 1 deletions
|
|
@ -102,7 +102,7 @@ slice = step / sub_cycle / timeline
|
|||
|
||||
// slice modifier affects the timing/size of a slice (e.g. [a b c]@3)
|
||||
// at this point, we assume we can represent them as regular sequence operators
|
||||
slice_modifier = slice_weight / slice_bjorklund / slice_slow / slice_fast / slice_fixed_step / slice_replicate
|
||||
slice_modifier = slice_weight / slice_bjorklund / slice_slow / slice_fast / slice_fixed_step / slice_replicate / slice_degrade
|
||||
|
||||
slice_weight = "@" a:number
|
||||
{ return { weight: a} }
|
||||
|
|
@ -122,6 +122,9 @@ slice_fast = "*"a:number
|
|||
slice_fixed_step = "%"a:number
|
||||
{ return { operator : { type_: "fixed-step", arguments_ :{ amount:a } } } }
|
||||
|
||||
slice_degrade = "?"a:number?
|
||||
{ return { operator : { type_: "degradeBy", arguments_ :{ amount:(a? a : 0.5) } } } }
|
||||
|
||||
// a slice with an modifier applied i.e [bd@4 sd@3]@2 hh]
|
||||
slice_with_modifier = s:slice o:slice_modifier?
|
||||
{ return new ElementStub(s, o);}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue