help on how to use Z_PUT_LAST
Oct 2, 2006 at 2:57am
help on how to use Z_PUT_LAST
I would like to get the DSP method of one object executed after the DSP method of another object. The tool to use seems to be Z_PUT_LAST, but after a look on the web I found :
Another question: I am writing an external which needs to do something as soon as the dsp is turned off. Is there any way to tell an external that the DSP has been turned off using an internal max message (equivalent to the DSP method), rather than having to send a message manually to my object each time, after turning off the dsp?
Thanks a lot for any help,
Oct 3, 2006 at 7:38pm
On Oct 1, 2006, at 7:57 PM, charly wrote:
> I would like to get the DSP method of one object executed after the
Sorry but as you discovered, this isn’t and won’t ever be guaranteed.
- use state flags bound to symbols to communicate between objects
- use patchcords to communicate between objects like tapin~/tapout~
- always operate one signal vector later thus guaranteeing all of the
- et cetera
If you provide us a description of why you need this, perhaps we
> Another question: I am writing an external which needs to do
void foo_dspstate(t_send *x, long n)
Oct 5, 2006 at 10:10am
Thanks a lot for your reply Joshua,
I’ll describe what I am trying to do, hoping for some advices (thanks to those who will have the courage to read it entirely).
I am currently working on writing tcpsend~/tcpreceive~ externals, to send and receive audio between 2 computers running maxMSP, via TCP.
I still have 2 issues: one is the initial synchronisation of tcpsend~ and tcpreceive~, the other is ensuring that they stay in sync “forever”.
1) The initial sync of tcpsend~/tcpreceive~ is done via a “handshake” in dsp methods of both objects. So the dsp methods doesn’t return till the handshake is done, or a timeout occurs. I wanted to use Z_PUT_LAST to ensure this method still works with multiple tcpsend~/tcpreceive~ objects and more than 2 computers. Now I need to find a way to press only one button to tell all the objects (on different computers) to begin to write or read in their respective circular buffers, at “the same audio time”, i.e. the next audio buffer processed by maxMSP. I am afraid that if I use MIDI or udpsend to pass a message across computers, they would be out of sync of a few audio buffers, except if Scheduler in Audio Interrupt is turned on maybe. So I am not sure how to do that. Any advice?
2) To ensure constant synchronisation (the circular buffer is never totally full or empty), perform methods have to be called every “n” second, with the same “n” for sender and receiver. I assume that “n” is always equal to (signal vector size)/(sampling rate) due to real-time input/output constraint. But on Windows XP, mme and directsound drivers have settings for signal vector size, sampling rate, but also “latency”, which is a bit confusing. So if I really wanna be sure that each audio buffer is processed every “n” second on all computers, can I use crappy sound cards and mme drivers with the same “latency” setting (apparently not), or do I need to have proper sound cards with ASIO drivers, or maybe even synchronized sound cards via word clock?
Sorry for this really long question, and thanks a lot for any help,
You must be logged in to reply to this topic.