On Tue, August 14, 2007 11:32 pm, Henning Thielemann wrote:
> I used this implementation so far, but I hoped that sending bundles makes
> this synchronous automatically.

this doesn't make sense?  the async commands are
precisely those that cannot be run from the
synthesis thread, they are staged and run from
a different thread.  (see the scsynth architecture
document in the sc3 documentation).

> How can I know how long I must wait? Maybe

you need to wait until the reply arrives.

> I must wait too long and I am not able to send the next message in time.

you need to ensure that you don't use resources that
do not exists or are not in the state you require.

scsynth is usually pretty good at gracefully handling
this kind of 'non-sense' (ie. using buffers before they
are allocated, nodes that don't exist, etc.) but it
will not do as you hope!

>  I like to use the same data structure for realtime and non-realtime
> performance. But as you said, messages with the same time stamp are

in that case you will need to somewhat more sophisticated
data structure!  (it would not need to be complicated though)

> executed in unpredictable order. That is
>
>                 send fd (Bundle 0 (d_recv g))
>                 wait fd "/done"
>                 send fd (Bundle 0 (s_new "Anonymous" (-1) AddToTail 1 []))
>
> won't work (if I omit 'wait' in non-realtime mode).

but that doesn't make sense, it says: "start d_recv, which
takes an unbounded/indeterminate amount of time, at 00:00:0
on january first 1970, wait until it notifies this process
it has completed, and then start the node at 00:00:00 on
january first 1970"?

regards,
rd


_______________________________________________
haskell-art mailing list
haskell-art@lists.lurk.org
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to