Communicating between patchers without using send and receive
Is there any other trick for communicating between patchers in different tracks of the same Live set, without using send and receive (which are often unpredictable timing-wise)? Obviously the tracks themselves can send audio and midi to each other, but i'm wondering about sending actual messages.
Thanks!
let me say it like this, you always need send/send~/forward as soon as you have 2 patcher windows.
in certain situations it might be enough to use [v] instead, but to send data, the send object is unavoidable.
use udpsend and udprecieve for messages.
eg
udpsend 127.0.0.1 8010 (127.0.0.1 Always declares the I.P address as the host computer, 8010 is the port to send to
this then go's to
udprecieve 8010 (don't write the I.P Address as it won't work)
I use this to control Jitter from ableton live and the timing is pretty rock solid. :)
Thanks for the responses. Have either of you gents ever experienced “phantom receives” when sending messages between devices? This was happening to me a while back and I couldn't figure it out. Occasionally messages would appear at the [r] without being sent from the [s] (I set up [print]s at each to monitor them), sometimes at very odd times, when nothing was actually going on in the patcher. Here's a screen shot of one time it happened. At the top of the Max window you can see two messages that were sent, each with the Rcommands event preceded by a Scommand as expected, but at the bottom you can see a Rcommands with no Scommand. Not asking for anyone to diagnose my patcher, just wondering if you've ever had the same experience.
i think what you saw was that a disconnected connection from or to a s/r object was not yet represented in the actual patcher code.
such thing can happen from time to time, with any kind of object, though i mostly see it with audio in and out.
@andro
Using udpsend and udpreceive, is there any way to programatically check which ports are already in use when setting up the connection, so as to avoid interfering with other processes?
No, port usage is secretly managed by the OS.
In my experience there is no advantage of OSC over send/receive. Both methods have basically the same timing behaviour, ie. variable latency in the range of Live's audio buffer size.
What about using live.remote~ to send messages (to a number box in another device, say), are there any advantages as far as timing or latency there?
According to my tests the latency of live.remote~ is about twice as much as send/receive.
So it looks like the implementation uses 2 audio buffers.
Well, well. That's good to know....
Is part of the problem that the schedulers for m4l devices in different threads are running independently.
So even if there was a zero latency method of sending data then it would still take a variable amount of time to read and act upon it.
I always thought (guessed) that was the issue with live.remote
Named Audio buffers are shared across devices aren't they? Or is that just jitter buffers?
Even if you can store and access data in audio buffers I think by the time you do anything with it there will be latency.
When Max 7 comes out all these timing issues will be a thing of the past ;-)
I think the timing issues could be solved only from Ableton. Note that in Live 3rd party plugins (including M4L) introduce latency where the synchronisation of different tracks is ensured by PDC (plugin delay compensation). But currently this works only for standard midi/audio routings. Including extra routings/communications would require a major redesign of Live, if at all possible.
When Max 7 comes out all these timing issues will be a thing of the past ;-)
Oh? How so?
When Max 7 comes out all these timing issues will be a thing of the past ;-)
thats what they said before Max/FTS 0.8b came out.
I've been reading up a little bit on Gen~ and was wondering, is it capable of sending messages between devices at sample rate? I don't have it so unfortunately I can't try it out.
What about sending a MIDI note to the next device in the chain? Or maybe a cc (if that's possible)?
You could use the lowest octave to trigger things in another device and use velocity too.
It's a clumsy workaround, but, does anybody know if that would be option with the lowest latency?
Also: does anybody know if max 7 did in fact change something?
Yeah, I eventually implemented an idea exactly like that for certain messages. I sent program changes through MIDI directly from one device to the next when I needed them to get there without latency.
And no, Max 7 didn't change anything to do with this that I'm aware of.
Thank you so much! That was goog news!
Meanwhile I finished patching using ctlout/ctlin and it works super nice.
I use the cc number and the value. I made a m4l device specially
to put on the end of the chain just in case a vst get's confused
by the cc messages, but it seems rare...I've seen Kontakt working with it...