Periodic playback issues when switching window focus

Hello,

This is similar to a few other threads:

But I figured I’d create a new thread because the details are a bit different.

First, I’m on M1 OSX 12.6 running Dorico in native M1 mode. Here are my settings:

Note that ASIO-Guard is off, which is the workaround in several other threads.

Of note, I am using VEP 7 to house sample libraries, etc.

When I playback my project, and Dorico is the main focused window, everything sounds good. However, when I switch to another window (first I thought it was just VEP, but now I can tell it’s any other window), I get the playback issues described in those other threads.

Also, this doesn’t happen 100% of the time, hence no screen recording to add. Will do that if I can reproduce it more consistently.

Is this something that can be addressed? Having playback running while tweaking in VEP is pretty key. Also note that this is happening with note audition, not strictly playback (as in I’m playing notes on my MIDI keyboard, sending MIDI through Dorico to VEP, and I have the same behavior).

Thanks!
David

Forgot to add my diagnostic zip:
Dorico Diagnostics.zip (3.9 MB)

Though it sounds paradoxically, what happens if you decrease the buffer size?

1 Like

Hi @Ulf , thanks so much for the response.

Confirming that increasing buffer size to 2048 and giving VEP an additional buffer of latency makes this issue go away.

Would you expect to need such high latency when just playing back a single instrument (and on a quite powerful machine)?

Screen Shot 2022-10-19 at 9.25.27 AM

Hi @dyross , actually no, with such a machine I would not expect the need for such high latencies. But also try to decrease the buffersize to something like 256 or even lower and see how that goes. It sounds paradoxical, but it might improve the situation as well. Because we currently a bug in the audio engine, where bigger buffer sizes may cause trouble. The next Dorico update will contain a fix for this.

Hi @Ulf , indeed decreasing the buffer size seemed so paradoxical that I misread it :wink:

Moving down to 256 does not fix this issue, and below that, my processor gets pegged.

What’s interesting is that playback CPU cycles seem dominated by the VST audio engine, even though, I would think, VEP is doing most of the work:

I’m running in the following (likely not really supported) way:

  • Dorico running in native M1 mode
  • Using Blue Cat Audio Patchwork to load non-M1 VEP plugin
  • All audio processing in VEP, including summing / master bus processing

So, it seems like Dorico is mostly responsible for sending MIDI to VEP and receiving a single stereo audio channel back. Am I thinking about this right?

The next Dorico update will contain a fix for this.

Any more details on timing etc. of this?

And, do you mind sharing what the issue is with larger buffers?

I’m sometimes seeing intermittent notes dropped (almost as if MIDI notes aren’t being sent to VEP). I assume this is likely a different issue, perhaps related to my complicated setup?

Ah sorry, the bug I mentioned is only in conjunction with ASIOGuard and as you wrote, you have switched that off, so yours is a different issue.
It is certainly unusual, that in your setup the VSTAudioEngine is consuming so much CPU power. We have to find out more on this. Also, what is that AU compatibility service? It’s also using quite some CPU cycles.

The AU compatibility service is how Patchwork runs non-native VEP plugin.
I can try running Dorico in rosetta mode and removing the Patchwork from the chain to compare.
Happily, it seems VEP is going to be M1 native relatively soon.

One other question - is the playback issue when navigating away from Dorico window focus related to CPU usage, or is there something else?

Difficult to say. In order to find out, we need a trace of your system, when the drop outs happen. Please refer to this old posting of what you’d need to do. In case of any question arising, please ask.

I sent you a DM with links to screencap and trace.

I discovered a new angle that I should have added above.

The “pop/click when navigating away from Dorico” issue only occurs when my audio device is Sonarworks Reference 4 Systemwide, not when its core audio.

Would it be worth taking a trace of this as well?

(The issue with midi notes seeming to drop is with any audio device, and isn’t 100% reproducible.)

Ok, I did try this:

I can try running Dorico in rosetta mode and removing the Patchwork from the chain to compare.

And it seems that the situation has not changed - VSTAudioEngine is still working harder than VEP despite seeming like it doesn’t have to do much.

Hi David, so my expert is back to office and she had a look but there are information missing in the trace, so she asked me to give you following instructions for creating a new trace:

  • start the Terminal app and cd (change directory) to the Desktop
  • start Dorico and load the reproducer project
  • in the Terminal type:
    sudo ktrace artrace -p 1234 [for “1234” put the process ID of VSTAudioEngine, you’ll find it in the Activity Monitor app]
  • return to Dorico and provoke the dropout situation (the quicker, the better, as the trace files get bigger with the time)
  • when the dropout was caught, go to Terminal: hit Ctrl + C (this will stop the tracing)
  • find the .ktrace file on the Desktop (or in your home directory)
  • enter “sudo ktrace symbolicate” in the Terminal (don’t hit return)
  • Go to your home folder or Desktop and find the trace file you’ve just captured (watch out for .ktrace) and drag’n drop the file into the Terminal
  • hit return and wait until the symbolization finishes (can last some minutes)
  • zip it and send me

If something is not clear or you have questions, please don’t hesitate to ask. The instruction is pretty techie, but my impression is that you are quite savvy and can cope.

Thanks again
Ulf