[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Re: OSC trouble Solution
On 1/6/06, JostM <sc@xxxxxxxx> wrote:
> In fact, I was looked into using SendTrig, and unfortunately it only can
> send out one value. It would be really great to have a SendTrig ugen which
> could send out an array. Would a modified SendTrig (SendTrigs") be dificult
> to do?
Multichannel expansion is your friend.
SendTrig.kr(trig, (0..valueArray.size - 1), valueArray)
should do it.
d = SynthDef(\sendtrig, {
var trig, valueArray;
trig = Impulse.kr(24);
valueArray = { LFNoise1.kr(Rand(0.1, 10)) } ! 10;
SendTrig.kr(trig, (0..valueArray.size - 1), valueArray);
});
d.children
// i.e., 10 SendTrigs
[ an Impulse, a Rand, a LFNoise1, a SendTrig, a Rand, a LFNoise1, a
SendTrig, a Rand, a LFNoise1, a SendTrig, a Rand, a LFNoise1, a
SendTrig, a Rand, a LFNoise1, a SendTrig, a Rand, a LFNoise1, a
SendTrig, a Rand, a LFNoise1, a SendTrig, a Rand, a LFNoise1, a
SendTrig, a Rand, a LFNoise1, a SendTrig, a Rand, a LFNoise1, a
SendTrig ]
d.children.select({ |ch| ch.class === SendTrig }).do({ |ch| ch.inputs.dump })
// each SendTrig has a different ID (input #1) so you can parse it in
the message coming from the server
Instance of Array { (0245F5E0, gc=24, fmt=01, flg=00, set=02)
indexed slots [3]
0 : instance of Impulse (0245C530, size=7, set=03)
1 : Integer 0
2 : instance of LFNoise1 (0245AD30, size=7, set=03)
}
Instance of Array { (0245EE70, gc=24, fmt=01, flg=00, set=02)
indexed slots [3]
0 : instance of Impulse (0245C530, size=7, set=03)
1 : Integer 1
2 : instance of LFNoise1 (0245B160, size=7, set=03)
}
...
hjh
--
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman