Author |
Message |
Khepri
Joined: Jul 20, 2009 Posts: 21 Location: Canada
|
Posted: Tue Sep 23, 2014 12:11 pm Post subject:
Array of different oscillators? |
 |
|
I know it's possible to create an array of UGens of the same type. How about an array of different types?
SinOsc Sin1;
SawOsc Saw1;
TriOsc Tri1;
[Sin1, Saw1, Tri1] @=> ???[]; _________________ Don't fear mistakes. There are none.
- Miles Davis |
|
Back to top
|
|
 |
kingcrabmeat
Joined: Sep 04, 2014 Posts: 4 Location: US and A
|
Posted: Wed Oct 01, 2014 10:40 am Post subject:
|
 |
|
I found the answer, thanks to ChucK's console output. I tried UGen out of curiosity and got this:
Code: | cannot assign '@=>' on types 'Osc[]' @=> 'UGen[]' |
So, the object you're looking for is, indeed, Osc.
However, anything besides the four standard oscillators is classified under UGen. Therefor, it doesn't seem possible to have both standard oscillators and other UGens in a single array. One may opt to use the Blit UGen objects instead as a workaround. |
|
Back to top
|
|
 |
Khepri
Joined: Jul 20, 2009 Posts: 21 Location: Canada
|
Posted: Sun Oct 05, 2014 1:39 pm Post subject:
|
 |
|
kingcrabmeat wrote: | I found the answer, thanks to ChucK's console output. I tried UGen out of curiosity and got this:
Code: | cannot assign '@=>' on types 'Osc[]' @=> 'UGen[]' |
So, the object you're looking for is, indeed, Osc.
However, anything besides the four standard oscillators is classified under UGen. Therefor, it doesn't seem possible to have both standard oscillators and other UGens in a single array. One may opt to use the Blit UGen objects instead as a workaround. |
Thanks _________________ Don't fear mistakes. There are none.
- Miles Davis |
|
Back to top
|
|
 |
essteb
Joined: Nov 03, 2014 Posts: 7 Location: Colombia
|
Posted: Wed Nov 05, 2014 1:33 pm Post subject:
in fact it is possible |
 |
|
its possible,
SinOsc sin; Blit blit;
[sin,blit] @=> UGen UGen_array[]; |
|
Back to top
|
|
 |
|