Headless Mode in Rack v2

Ok thanks :slight_smile: happy to try it soon

Any chance you’re planning to include any way to do non-realtime rendering as part of Rack v2’s headless mode? I’d imagine it’s not high on your list of priorities but thought I’d ask.

What I mean is something like this:

./Rack -h <patch file> <number of seconds to render> <output filename>

For example, this would generate a 10 second .wav file:

./Rack -h example-patch.vcv 10 output.wav

I suppose that an outputModuleId and outputId would have to be provided so that headless mode know’s what signals to render to the audio file channels.

non-realtime rendering is kind of the opposite of VCV, isn’t it? Is the idea you “press play” and then it renders away on its own?

Yes. Supercollider has this functionality: https://doc.sccode.org/Guides/Non-Realtime-Synthesis.html

VCV Rack doesn’t know what a “patch output” is.

Instead, use VCV Recorder in your patch.

1 Like

Non-realtime rendering has already been announced:

  • Modules like VCV Recorder that can run much faster than real-time can render minutes of audio in only seconds, if they are chosen as the “Primary audio module”.
1 Like

And when the GPU is idle … perhaps acceleration - 30x larger patches perhaps …

On the other hand … that road has been traveled by others, not much gain.

It takes a long time to get audio into and out of the GPU. Totally terrible for VCV modules. Not even that good for most VSTs.

There are many reasons that GPUs would be worthless for audio acceleration in VCV Rack.

Will the headless mode in Rack for DAWs intervene when Rack is hosted by a DAW as a VST, or headless mode has nothing to do with this and we will always be not-headless in this use case?

“Headless mode” just means a couple lines of code to disable window initialization, running, and destruction when the -h flag is passed. However in order for this to work properly, thousands of lines and dozens of classes were completely restructured to make these couple lines work.

Rack for DAWs is based on Rack v2, but it of course don’t have a -h flag because that doesn’t make sense for VST plugins. Instead, it behaves as normal VST plugins should and hides/shows the Rack window when requested by the user via their DAW.

3 Likes

Hi Andrew, just wondering how we run headless mode on Mac? @Vortico

Rack v2 can be run in headless mode via the command line (terminal app on Mac)

This command assumes your present working directory contains the Rack executable file. On my Mac, the latest development build of Rack is in the folder:

/Applications/VCV Rack 2.app/Contents/MacOS/

So to run this development build of Rack headless, you would need to run the command:

/Applications/VCV\ Rack\ 2.app/Contents/MacOS/Rack -h

(The slash \ characters are there because there is a space in the folder name)

If you want to run a specific patch, pass the relative or full path to the patch file as the argument:

./Rack -h patches/test-patch.vcv

3 Likes

@computerscare Thanks that worked perfectly!

1 Like

Keep in mind that modules used during the headless mode have to have been coded so that they can be run without the GUI. I noticed that for example the Audible Instruments Macro Oscillator 1 (Braids) caused a crash for me in the headless mode. (Tested on Mac Os.)

When will VCV Recorder be available for Rack 2?

2 Likes

Most will probably “just work”? It’s a rare module that goes out and talks directly to the UI.

Probably. I didn’t yet check why exactly the Macro Oscillator 1 module crashed…

I didn’t remember about this discussion, can a moderator move my 2 posts from here? tnx

https://community.vcvrack.com/t/vcv-rack-2/14027/306

I tried to run the headless mode on manjaro and it works perfectly!

on my desktop pc it takes ~50% less memory and ~60% less cpu!

I also tried to perform live something via midi and there’s no problem at all :sunglasses:

@Vortico is it possible to create an executable file (pizza.exe or pizza.sh or something else) that saves everything in it? let’s say that I don’t care about the size of the file and the audio goes to the default audio device…

my goal is to run a patch on a server (with no Rack installed) and listen to that patch like a web radio, just knowing the address

5 Likes