I’m working on a module at the moment that needs a 1 second timer so am accumulating sampleRate on each step through the process() function and using the crossing of 1.0 as an indicator of 1 elapsed second but I have noticed when there is no Audio module or an audio device has not been selected in the Audio module, my timer ticks over at double speed. The engine sample rate in Rack is set at 44.1khz and sampleRate and sampleTime are being passed in to the process function correctly for this selected value. It is almost as though the process function for my module is being called twice for each sample step unless there is an audio device to control it. Has anybody else noticed this behaviour?
The real-time step rate is undefined when there is no module that blocks
process() (e.g. VCV Audio), but it tends to be roughly 2x the sample rate. I don’t feel like explaining why—read the source code if interested. In Rack v2, the engine will not step unless a “primary module” (e.g. VCV Audio) tells it to.
Does that mean plugin devs are going to need to patch up an audio interface just to test plugins? Will the interface need to be patched, or can it just be sitting in a patch unconnected?
Yes. The primary module does not need to be patched to anything. It just needs to exist.