< Back to IRCAM Forum

Capturing OSC as it comes back from Reaper via OSCar

Hi all,

I’ll describe what I’m trying to achieve and the problems I’m having. Hopefully it all makes sense.

I’ve created a Max patch that allows me to send source position information as OSC data to REAPER, write this information as automation envelopes, then have it received by spat5.oper in Max. What I’m now trying to do is to capture this information coming back from Reaper as .xml files, using spat5.osc.record~.

My end objective is this: I’m working on a piece for live instrument and pre-recorded multichannel audio. I’ll need a performance patch that enables me to trigger soundfiles at various points. Rather than triggering files with pre-rendered spatialization for a pre-determined array, I’d prefer to trigger multichannel files whose channels correspond to individual sources in Spat5, each of which is spatialized in real-time following meticulous trajectories that I’ve worked out ahead of time. My motivation is to allow for a more flexible transference between performance situations/arrays.

Here is the process I devised as a possible solution:

  • The audio files I will eventually trigger during performance from Max are bounces of Reaper multitrack sessions. Each original multitrack session has X number of tracks / instances of OSCar (corresponding to sources in Spat5). That way, while composing, I can spatialize in Max and write the info as envelopes in Reaper.
  • I bounce each multitrack session as a multichannel file. A file with X channels will be routed to Spat5 as X number of individual sources.
  • After bouncing a mulitrack session, I create a corresponding .xml file of its spatial information, by playing the entire session from Reaper and recording the info received by Max (via OSCar) with spat5.osc.record~.
  • Theoretically, I could set up my performance patch so that, when an audio file is triggered, a corresponding .xml file is read simultaneously by spat5.osc.play~, reproducing the spatialization I’d worked out ahead of time.

My Problem:
I apparently don’t understand well enough how spat5.osc.record~ and spat5.osc.play~ work. I have been successful in using the help patches, but unsuccessful once I implement these objects in my own patch. I suspect that the problem has to do with how information is formatted as it is received by spat5.osc.record~. In this object’s help patch, it is receiving info directly from spat5.viewer, formatted as /source/*/aed. In my patch, however, OSC data returning from Reaper via OSCar is not given in triplets but rather individual coordinates. Furthermore, I am working with Cartesian coordinates rather than polar. So when OSC comes back from Reaper, I get individual values for x, y, and z coordinates.

My questions

  • How do I record OSC info as it returns to Max from Reaper via OSCar?
  • Should I explore a different method to achieve my overall goal (the performance patch I described above), and what would that be?

Thank you to all for your thoughts!
Tim

Hi Tim,

Your objective is very clear and makes total sense.

One warning/reminder : spat5.osc.record~ and spat5.osc.play~ are currently in an experimental stage, so use at your own risk.
In particular, I have no idea how these object behave with real-world data such as long recordings (and heavy automation).

spat5.osc.record~ and spat5.osc.play~ are unaware of the coordinate format. They just handle any OSC message, regardless if it’s xyz, aed, or x, y, and z separately.
Therefore they should be straightforwardly compatible with data sent from OSCar/Reaper.
I dont see what your problem is. Maybe send a (simplified) patcher and I’ll have a look at it.

I’m not aware of other easy method to achieve your overall goal.
I believe that vezer can export automation data to xml, but 1) I havent tried it myself, and 2) it wouldnt be straightforwardly compatible with spat5.osc.play~ (but I presume it could be made compatible…)

I know it would be great to be able to “render” the OSCar plugin, i.e. to (offline) bounce all the automation data to file. I will think about it, but it’s not an easy task.

Cheers,
T.

Dear Thibaut,

Thank you for your helpful replay, and apologies for my delay in responding back. I’m not sure what mistakes I was making before, but I’ve gotten my patch to work as I hoped it would! I’ve attached it here.

I will take a look at Vezér, which I hadn’t heard of before. My university has a Skyspace by the artist James Turrell, and we often hold performances there, synchronizing light sequences with multichannel compositions. Hans Tutschku premiered a new piece with us a few years ago, and perhaps Vezér could have been helpful to us then!

Yes, the ability to “render” OSCar would be a terrific feature, but I realize it would be very difficult to implement.

OSC-to-Reaper.maxpat (192.1 KB)

Glad to hear you managed to get your patch working.
Performances under a skyspace by James Turrell : awesome ! I would love to experience that someday.

Best,
T.