hi list,
i'm sending control data to a vline~ object over the network. those
are precisely timed messages. i can hear uncontinuous errors in the
output, some messages seem to be delayed.
when i use OSC the timing is pretty bad. now i use netserver/
netclient and it's getting better, but there are still some
discontinuity hearable (in the sampleplaying of the tabread4~ driven
by the vline~).
i guess i can further optimize by avoiding all other network traffic,
but is there another way to get the sheduling tighter?
thanks, m.
Max Neupert wrote:
hi list,
i'm sending control data to a vline~ object over the network. those
are precisely timed messages. i can hear uncontinuous errors in the
output, some messages seem to be delayed. when i use OSC the timing is pretty bad. now i use netserver/ netclient and it's getting better, but there are still some
discontinuity hearable (in the sampleplaying of the tabread4~ driven
by the vline~).i guess i can further optimize by avoiding all other network traffic,
but is there another way to get the sheduling tighter?
I think the best way would be to put some kind of timestamp in the messages and have the receiver hold the received message until the timestamped time occurs. That should get rid of any jitter at the expense of a second or so of delay. Otherwise put the machines as close together as possible (speed of electrons is about 10cm per nanosecond ;)) and have them be the only two machines on the network, using a crossover cable instead of a switch/router. Also disable background network processes like file sharing and NTP. Martin
I think the best way would be to put some kind of timestamp in the messages and have the receiver hold the received message until the timestamped time occurs. That should get rid of any jitter at the expense of a second or so of delay.
In fact that's an interesting point related to OSC. OSC of course supports exactly this -- the use of timestamps for synchronizing data. And yet it's rarely actually used to its full advantage. In both the Pd and Max/MSP implementations there's no way to send data over an OSC connection scheduled for a delayed timestamp. In other words, there's no way to sacrifice a bit of latency for timing precision. However, OSC itself should allow you to do it.
I wonder if it would be a good thing to have sendOSC accept another message, such as "delaysend" or something which allows specifying what time the message should be deployed on the receiver. It would be very useful, for example, for synchronized clocking over multiple clients.
Any thoughts? How might the timestamp be most easily specified in Pd?
Steve