diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-05 04:51:58 +0200 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-05 04:51:58 +0200 |
| commit | a6fcf83f27a944ca455425f3cd3a037cf3952dd1 (patch) | |
| tree | 0864134eab9b0690363098fc66411d038719000a | |
| parent | 9a25e0e5c9568a485c348dac580fa5daf2622d82 (diff) | |
| download | digitale-debutanten-a6fcf83f27a944ca455425f3cd3a037cf3952dd1.tar.gz | |
use array initializers
objects must be casted to UGen (perhaps a bug since the array types should be compatible)
| -rw-r--r-- | lfo.ck | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1,11 +1,10 @@ /* * Configurable LFOs */ -/* FIXME: ChucK bug prevents elegant initialization with [new ..., ...] */ -UGen @lfo[3]; -new SinOsc @=> lfo[0]; -new PulseOsc @=> lfo[1]; -new SampOsc @=> lfo[2]; +[new SinOsc $ UGen, + new PulseOsc $ UGen, + new SampOsc $ UGen] @=> UGen @lfo[]; + /* BUG WORKAROUND: setting lfo[2].gain crashes */ 10 => (lfo[2] $ SampOsc).gain; /* preamp, to get value range 0 to 1000 */ @@ -18,9 +17,8 @@ for (0 => int i; i < lfo.cap(); i++) 0 => int cur_lfo; -UGen @osc[2]; -new SawOsc @=> osc[0]; -new PulseOsc @=> osc[1]; +[new SawOsc $ UGen, + new PulseOsc $ UGen] @=> UGen @osc[]; 0 => int cur_osc; |
