VCV Shared Memory Module

Hi everybody,

I am looking into writing a shared memory to communicate with a few other software. However, I am running into a bit of an issue right now.

I am not that well versed in VCV Rack development, so, please excuse any mis or naive understanding of VCV Rack. :slight_smile:

The execution model of VCV Rack modules is not very conducive to such shared memory module. Specifically, process() being called for every sample, one sample at a time. Putting data into the shared memory in a no-lock wait free fashion 1 sample at a time is extremely slow. It’s much more efficient to copy blocks of data at a time.

However, I can’t seem to find a way to hook into the audio block call back. I think the ideal situation would be to copy a whole audio block onto the shared memory.

So, I was wondering if there is a way to hook into the audio block call(?) ?

I peeked into the VCV Recorder module. The way it works could be a solution, where I will just run a secondary thread that accumulates the block, then pushes onto the shared memory.

Would that be the recommended solution?

Please let me know. Thank you!

Da.

Yes, secondary thread is a common way to do this.

1 Like

Sounds good.

Thank you.