Playback hang, MIDI flash dance

Sorry if this is complicated; hopefully I can explain it well enough

Setup:

Install a virtual loopback cable. (for me its LoopBe30 64 bit on windows) Create about 20 VST tracks in a DAW (Using Reaper at the moment). Connect Dorico staves to said VST in Reaper using Dorico’s MIDI instruments section. Also have a MIDI keyboard with input/through set in Dorico only. This setup worked great in the beginning, but it seems like I’ve crossed some kind of line as I add.

GOOD SYMPTOM:

Selecting any random stave in Dorico, Play some keyboard notes and the corresponding VST responds immediately and cleanly in the DAW.

BAD SYMPTOM:

Press play in Dorico - and the playhead likely won’t move, though sometimes it will after repeated start and stop of the transport. Mute all midi channels though in LoopBe30, press play and the playhead moves in Dorico. Quickly unmute the channels and all is well, at least until you stop the transport. Note that at the beginning of playback you will always see MIDI flashes on all channels. Using a MIDI logger on the insert, I can see that every channel gets several setup messages like volume, pan position, pitch wheel position, MSB, etc. when play is pressed, even when the playhead doesn’t move. But it does not get any note on/off when the playhead is “stuck”

NEUTRAL SYMPTOM:

I spend a lot of time thinking the issue was some kind of contention over the ASIO driver, or audio engine or whatever. Tried all sorts of things like pointing the DAW to the generic driver which is connected to the icky laptop soundcard, and Dorico to my Scarlett. Started with a silence template before adding MIDI instruments and made sure there was no actual audio out from Dorico. Tried putting the DAW on WSAPI and other weird settings I could find. None of it seems to matter. And IT SOMETIMES DOES WORK correctly, where I think an audio contention issue would always fail?

Can send the diagnostic if you want.

So questions: Is there some kind of MIDI handshake where the DAW isn’t responding right? Why would Dorico be stopped like that? I’m not assuming the issue is Dorico.

This sounds like a feedback loop. By default, Dorico listens to all MIDI devices, so if Dorico is playing to a loopback MIDI out then the event will come back in through the loopback MIDI in, which gets echoed to the loopback MIDI out, which comes back through the MIDI in…

If you are using a loopback device in Dorico then ensure that you’ve turned off the MIDI input for the corresponding loopback channel. So if you’re using LoopBe’s channel 1 for Dorico => Reaper, then in the Preferences, turn off channel 1 in Dorico’s MIDI input dialog. Similarly in Reaper, ensure that you’re not inputting and outputting to the same loopback channel.

It does sound like that doesn’t it? - I ran into that when I first set it up and had to be sure the channels were disabled for input in Dorico, and I had disabled all output from any MIDI channels Reaper. - I also tried disabling all MIDI input and Through to Dorico as a test including the keyboard. Didn’t work…

Also - I can somewhat reproduce the problem when the DAW is not running - when Dorico is talking to the virtual cable only - the Playhead can still stick, but its a lesser percentage of the time. Also, mute all doesn’t always fix it right away on the first press of play. Like there is a queue of MIDI events that have to expire or whatever.

Its worse when I have more than one port enabled - doesn’t seem to matter which port I enable though.

BTW loopbe does have some form of feedback detection - not saying that I’m sure that it would totally rule that out, but it did detect my original feedback issue.

Can you get Dorico into the state where you can reproduce this issue, then create a diagnostic report (Help > Create Diagnostic Report, which writes a DoricoDiagnostics.zip file on your desktop) and make a note of the time that it happens, and I’ll see if there’s anything suspicious in the log file.

Yes sir, absolutely. Please see the attached file. This description might be TMI, but doing my best to help. This is a fresh boot, Dorico started 10:55 AM local time (CDT, if that matters)

NOTE: The Dorico Project is currently using 10 MIDI Instrument/Ports, Port 1 is currently consuming 11 channels, the rest of the ports have two channels each. At this point Reaper is not running, and has never run so the computer should be relatively clean. I’m not sure this first part is relavent, but just not to confuse anything in the logs.

10:59 Press Play, playhead does not move. Stopped at 11:00
11:01 Press Play, playhead moves. (several good runs)
11:02 Press Play, playhead does not move
11:03 Press Play, playhead moves

Now Reaper is started, There are 16 VST instruments currently loaded in reaper, with a little more than 5 GB of memory free.

11:23 Press Play, playhead does not move
11:25 Press Play, playhead does not move, (Rinse and repeat 7 times)
11:27 All ports muted in LoopBe30
11:27 Press Play many times, Playhead does not move
11:30 Playhead does move, unmute all ports, hear normal playback

11:32 Press Play many times, playhead does not move, muted port
11:33 Press Play, playhead doesn’t move

Being stubborn today? Nothing working so killed Slack, cisco VPN etc. that were autostarted so more memory freed

11:37 Ah okay, the magic sequence seems to be. Unmute, Press play and head is stuck, stop, mute, press play again and the playhead moves, umute to hear normal playback.

11:39 magic process repeated. couple of failures but then it worked.
11:42 magic process repeated.
11:44 magic process repeated. couple of failures but then it worked.
11:52 magic process again, two tries to work.

FWIW Minimal extra CPU consumption while the playback head is stopped, LoopBe30 is near to zero CPU, memory, disk , network, etc. Obviously the machine is busy when the Playhead moves forward.
Dorico Diagnostics.zip (570 KB)

This is a weird one - I’ve really no idea what’s going on here. There’s nothing in the warnings that indicate a problem. If the playhead doesn’t move then usually that is an indication that Dorico isn’t getting regular callbacks from the audio engine (which can happen if you have exclusive device or sample rate conflicts), but if that was the case then I would also expect some specific errors to be reported about event buffers not being cleared.

I think the best approach to diagnosing this is to build up one step at a time to see where things fail, eg

  1. Create a new piano only project with a notes using HSSE - does that play back OK?
  2. Assign the output to loopbe (no Reaper yet). Does the playback line move?
  3. Start Reaper. Does Dorico play back into Reaper and the playback line moves?
  4. Create a few more instruments and route into Reaper - what happens now?
    etc

Hello Paul - here is an update with some highlights of the journey so far. :slight_smile:

Same problem with either Reaper or Studio One Pro 5.x (S1) Though the work around with S1 is more reliable and I’ve given up on Reaper and gone back to S1. S1 gave me some different parameters to play with, but none made an impact on the problem.

Tried 2 other Virtual Midi Drivers. Virtual MIDI hung on the longest, but as it has no mute all/mute none feature, the workaround is easier on loopBe30. At this point the only parts I haven’t swapped are the computer itself and Dorico.

Building one stave/track at a time in a new project, it works cleanly until about the 9th MIDI port in virtual Midi, or about the 7th port in LoopBe.

I’ve been using ports versus channels because it allows me to have channels mapped on a port for articulations that I haven’t loaded yet - EX: if I decide I want a Bartok or cup mute, I will load that sample on an additional channel that is already mapped, and the expression map or channel configuration doesn’t have to change. I find that I can get a bit further if I put more than one instrument on the same port - it’s a little harder to keep track of the routing and I’ll have to modify the expression map a bit but doable.

I’m not sure if the problem is just that there is a bunch of MIDI happening all at once on the initial press of Play. I noticed that I get init type events on all channels of a port, even if I’ve limited the endpoint config to just the channels I’m using.

Any thoughts?

That is all rather odd. I’m at a loss as to what to suggest next. I’ve been using LoopBE myself with Dorico for the past few years and haven’t encountered any problems. The only thing I can think of is that there’s an internal buffer that’s used for MIDI outputs (rather than VST outputs) which fills up once we get to 7-9. It would be useful if you could take it to the threshold with LoopBe where it still works (eg with 6 ports), play it back, note the time. Then create a 7th/8th port so it breaks, then play back and note the time. Then create the diagnostic log. That may just have some useful numbers which could help in isolating the problem.