I am running Dorico 2.2 on a Mac with version 10.13.6. Even when I have selected Silence as the audio template, I have a constant CPU load of 10% of the VST AudioEngine. When I choose NotePerformer it even gets a bit higher. And I have this load, even when Dorico is in the background and no playback is playing.
I would understand, that the engine causes load when I playback. But my expectation is, that it does not use any significant resources when no playback is running or even configured.
Can I change a setting to improve this? I am asking because when I am on the way, this load reduces my battery faster than it has to be.
Or if there is nothing that I could do, could you consider to pause the engine, when there is nothing to play?
The audio engine does use some CPU at all times because it’s always running an event loop so that it is ready to start outputting notes whenever it is required to, for example as soon as you select a note or start doing note input. There’s no way to prevent the audio engine from using a little CPU at all times while it’s running. If you want to prevent it from using any CPU at all, you would have to remove it from Dorico altogether, which is something I certainly do not recommend. But, if you want to do it, you can, by doing Show Package Contents on the Dorico 2 application package in your Applications folder, and move the VSTAudioEngine2 bundle out of the Applications folder temporarily. There is no way, however, to start and stop the engine while Dorico is running.
Daniel,
I don’t know the details of the process and which mechanisms of Qt you are using here. But it seems to me that the event loop is polling on some kind of timer event and is looking for new events. Why don’t you use here a mutex and a condition variable to wake up the loop, whenever a new event to play is coming?
Regards, Felix
Mutexes are S—L—O—W. For real time audio processing, you don’t want to wait a random amount of time of the order of a millisecond (or worse) for something to wake up. That could be hundreds of audio samples worth of time wasted before you even noticed you were supposed to be doing something, with a audio high sample rate.
Felix, I’m sure you could sit down and have a fine old chat with our real-time focused developers about this stuff, but please be assured that the developers working on the audio engine are among the top experts in the field, and they’re well aware of the trade-offs between CPU usage and performance.
10% seems a bit high, I would not expect that much with the silence template. At what buffer size are you running the audio interface? (You can check under Edit > Device Setup and then push the ‘Device Control Panel’ button. If you increase the buffer size you should get less CPU load.
you are right. Setting the value to 2048 reduces the load to 5%. @Daniel and @Rob, I see, I was thinking too short. I just read some articles about low latency audio programming and now I understand much more the difficulties. Sorry for making such dumb suggestions.
Must be some Mac-ism. Here on Windows 10 I’m at under 1% at idle with a 10ms buffer size, and even while playing back a couple tracks I’m only at 3-4%.
Care to put a number on ‘ridiculously high’? Other details, like Mac model, RAM, OS version, Dorico version, sample library, etc might be helpful.
If you are using lots of VSTs, with lots of effects, reverb, etc:- they will be processed all the time.
For comparison, a 25 minute, 10 Flow project with 8 VSTs of Orchestral Tools instruments, plus 4 VSTs of ARIA Player, with several samples in each one, plus Stereo Enhancer, 2 Reverb channels, and a Compressor, uses around 26% of 1 core while idle; Dorico itself uses 1.5%. This, on my M2 Pro Mac Mini.
During playback, that goes up to 75% - 100% core for the VST Engine; and 25% for Dorico itself.
With no projects, the VST Engine is at 6%; Dorico at 0.5%.