[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-dev] CocoaDialog works, sched doesn't
On Sunday, January 12, 2003, at 08:49 AM, crucial felix wrote:
did all those scheded events happen while the flow control was doing
the modal window ?
in the test case i was doing (posting numbers every second), when you
get back to the app
all the numbers are posted at once. but would a function that sends
OSC message get sent
at the scheded time (while the dialog is still happening), or all in a
clump when we get
back ?
The SystemClock events happen as they should. If you try to postln,
then those all have to wait until the dialog finishes. I've made some
simplifications to the code, which I've committed.
Try this (it requires a change I committed to Function.sc):
s.boot;
(
SynthDef("tink", { arg freq = 1000;
Out.ar(0, SinOsc.ar(freq, 0, Line.ar(0.2,0,0.1,doneAction: 2)));
}).writeDefFile;
s.sendMsg("/d_load", "synthdefs/tink.scsyndef");
)
CocoaDialog.getPaths({arg x; "ok".postln; x.postln },{"cancel".postln})
{ s.sendMsg(\s_new, \tink, 1001, 1, 0, \freq, 1000); 1
}.play(SystemClock);
{ s.sendMsg(\s_new, \tink, 1002, 1, 0, \freq, 800); 1 }.play(AppClock);
s.quit
--
--- james mccartney james@xxxxxxxxxxxxxx <http://www.audiosynth.com>
SuperCollider - a real time synthesis programming language for the
PowerMac.
<ftp://www.audiosynth.com/pub/updates/SC2.2.16.sea.hqx>