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

Re: [sc-users] how to tell when n_set messages have been executed



Since you're not timestamping your OSC messages, probably the actual execution time of the n_get is wrong.
hjh


On Wed, Jul 29, 2009 at 1:23 PM, Sciss <contact@xxxxxxxx> wrote:
totally strange. even if you initially wait _two_ control blocks, the reported value might still not have been updated:


~synth = {arg freq=440; SinOsc.ar(freq:freq)}.play;

(
Routine({

 ~wait = true;
 100.do{
       ~new_freq = rrand(400, 600);
       ~synth.set("freq", ~new_freq);
       ("waiting for freq "++~new_freq).postln;
       while({~wait}, {
         (s.options.blockSize*2/s.sampleRate).wait;

         ~synth.get(\freq, { arg value; ("freq is "++value).postln;
               // has the synth been updated?
               if (value == ~new_freq, {~wait = false;"Synth control updated!".postln}, {"waiting... ".postln});
         });
//        0.0001.wait;
       });
       ~wait = true;
 };
}).play( SystemClock );
)

i.e. i still get "waiting..." here a lot. something with the server scheduling must be definitely be broken, i assume?

ciao, -sciss-



--
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