[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Score issue (FAILURE s_new SynthDef not found)



One thing that might not be obvious on the surface is that UGens and OSC messages don't get along well with Buffer objects -- actually they want buffer numbers. Communicating with the server by way of Synth objects automatically converts Buffer objects into buffer numbers using the method asControlInput. To illustrate, this code prints out the s_new message for a Synth.

b = Buffer.alloc(s, 512, 1);

a = Synth.basicNew(\xyz);
a.newMsg(args: [\buffer, b].postln);

First postln: [ buffer, Buffer(0, 512, 1, 44100, nil) ]
Result: [ 9, xyz, 1000, 0, 1, buffer, 0 ]

The array going in has Buffer(0, 512, 1, 44100, nil), but the final OSC message has "buffer, 0."

In your example, you're writing the OSC messages directly without converting the array elements into valid control inputs. That could interfere with the server's proper parsing of the affected message or later messages.

hjh


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman