Recording udp / osc data

Hi!

So I would like to make a udp / osc recorder.

My current use case:
I want to perform music with OSC data from VCV rack on one notebook, however, VCV rack can be very cpu hungry. I want to remedy this with recording VCV rack performance as WAW with all OSC data as well.

I could record two things -
Osc - I can use some solutions that are done already, like recorder node in vl.animation, I think only part that is currently needed is adaptive lerp that is able to handle OSC, I do not know how to add this part. For me this would be enough right now

UDP - record UDP data directly, could record for example data from arduino or dmx, but would have to add timecode into UDP messeage (not really possible for my current use case, I do not have access to add custom UDP messeage to output from VCV rack). But overall, this seems like interesting path since its much more universal (record arudino outputs so you could work on dummy data when working)

for my case, these are very small data netries so size and saving it is not a problem, but it might be usefull for community to have toolkit for doing this ready, there were some talks about it here:

right now, I would appriciate if anyone could help me with making the custom lerp, it seems like most straightforward thing for my use right now. I am also interested in how did any of you synced stuff with timecode (do you have to run two clocks, and you constantly adjust one to fit the recorded data?)

Thanks!

1 Like

Just create an operation called Lerp that has the correct data type for inputs and output (+ a Scalar pin of type Float32). What happens inside that operation depends on the actual data you are sending in the end.

1 Like

damn I had no idea its this easy, i thought I had to force editable packages on something etc.

And instead of OSCMessage, you can of course also make your own data type MySynthParameters and Lerp it.

If making a smooth transition between two states isn’t possible or too tedious, you can also just switch when the Scalar is > 0.5.

yes ill do it with switching

So the good news is that it seems to be working well!

I am doing a bit weird conversion osc->observable->hold latest->record->observable->osc
not sure how else to do it within observable

So there are some problems with musical data being hard to translate to 120fps, but I can just use envelopes on percussion triggers to solve this.

I will try to send all data constantly even if they dont move, maybe it will make everything better. The way how everything is stored and written is not very efficient, but I would have to spend much more time on exploration of how to write everything more efficiently.

I will post all my findings here, but its works specific for VCV rack/ableton

Here is a quick sketch for a general UDP Recorder/Player, ie it works with OSC, TUIO or any custom data coming in via UDP. Would be interested to hear if this helps in your scenario.
UDPRecorder.zip (19.8 KB)

One thing to note with this implementation: it doesn’t stream to/from disk but rather record to memory, dump to disk and load everything from disk in one go. so if you record/play rather long sequences of a lot of data, this could be an issue.

If useful, it could be made into an extension and even standalone executable.

1 Like