diff options
Diffstat (limited to 'alv-lib')
| -rw-r--r-- | alv-lib/rhythm.moon | 2 | ||||
| -rw-r--r-- | alv-lib/util.moon | 36 |
2 files changed, 2 insertions, 36 deletions
diff --git a/alv-lib/rhythm.moon b/alv-lib/rhythm.moon index 8170cf9..d4d4e6c 100644 --- a/alv-lib/rhythm.moon +++ b/alv-lib/rhythm.moon @@ -79,7 +79,7 @@ trigseq = Constant.meta meta: name: 'trigseq' summary: "Generate rhythms based on a trigger-sequence" - examples: { '(trigseq trig! [s1 s2…])', '(trigseq i [s1 s2…])' } + examples: { '(trigseq trig! s1 s2…)', '(trigseq i s1 s2…)' } description: "Generates bangs according to the sequence `s1`, `s2`, … Each step should be a bool~ that determines whether a bang should be emitted on diff --git a/alv-lib/util.moon b/alv-lib/util.moon index 2323377..350c087 100644 --- a/alv-lib/util.moon +++ b/alv-lib/util.moon @@ -11,7 +11,7 @@ switch_ = Constant.meta meta: name: 'switch' summary: "Switch between multiple inputs." - examples: { '(switch i v0 [v1 v2…])' } + examples: { '(switch i v1 v2…)' } description: " - when `i` is `true`, the first value is reproduced. - when `i` is `false`, the second value is reproduced. @@ -64,41 +64,7 @@ edge = Constant.meta @out\set true @state = now -change = Constant.meta - meta: - name: 'change' - summary: "Convert value changes to events." - examples: { '(change val)' } - - value: class extends Op - setup: (inputs) => - value = val!\match inputs - @out or= value\type!\mk_evt! - super value: Input.hot value - - tick: => - now = @inputs.value! - if now != @state - @out\set @inputs.value! - @state = now - -hold = Constant.meta - meta: - name: 'hold' - summary: "Convert events to value changes." - examples: { '(hold evt)' } - - value: class extends Op - setup: (inputs) => - event = evt!\match inputs - @out or= event\type!\mk_sig! - super event: Input.hot event - - tick: => @out\set @inputs.event! - { 'switch': switch_ :edge - :change - :hold } |
