Skip to main content

Synfire with a custom OSC host

Posted

Kind of excited by this so I thought I'd share.

I've used the juce framework to build a tag based VST3 OSC server which uses tags to direct which VSTs and channel combinations should play the sounds.

Sounds are sent from Synfire via the OSC client, thereby bypassing midi. The midi data (notes and controllers) are sent in an OSC message to the OSC server together with the tags which tell the server which VST3i's should play the notes.

Works well with Synfire.


Sun, 2024-10-27 - 09:17 Permalink

The OSC Client bottom left is loaded in to Synfire as a Vst plugin instrument.

Sun, 2024-10-27 - 09:41 Permalink

Interesting. How is the timing? Are the notes played as they arrive or are they scheduled in advance with a timestamp?

Sun, 2024-10-27 - 09:43 Permalink

OSC is designed for real time packets, so timing is more robust than tcp/lan network approaches as I understand. Plus we are only sending midi data, and the server is on the same PC.

Sun, 2024-10-27 - 10:26 Permalink

External hardware processes incoming MIDI immediately. A plug-in or host can't. MIDI data is processed along with audio in blocks. For messages sent in real-time there is a noticeable delay depending on the block size. A host or plug-in can add a message only to the next block (the current one has already departed).

That's why Synfire sends time-stamped data ahead of time.

If you keep the Juce host's block size small, the delay will not matter much. You will still notice it with drums and percussive instruments though.

Sun, 2024-10-27 - 13:54 Permalink

The latency will be there but the same as if I was playing in using a USB midi controller. For super tight timing, I would be taking the midi export into Presonus Studio and recording offline. However, for prototyping/previewing I’m thinking this set up could work ok?

Sun, 2024-10-27 - 19:17 Permalink

I’ve tested it with sequence runs 1/16ths and the timing is quite solid. Buffer set to 512 samples.