MIDI does not work correctly with Ardour 8.1 (7.5 does)

Hi, new Ardour user here

I am clueless how to debug my MIDI problems with Ardour 8.1, switching to JACK instead of PipeWire does not solve the problem.

What works: Linux Mint 21.2 with PipeWire 1.0 (0.3.84 worked, too) and Ardour 7.5 (Backports PPA) and a MIDI loop with my workstation, which is also the USB audio interface. Recording up to 8 MIDI arpeggiated channels simultaneously works. Bouncing 4 MIDI channels into stereo audio tracks at once is no problem. Mackie control works, MIDI clock sync too. I was amazed and switched to the payed version 8.1.

What does not work using 8.1: same setup as above with 8.1 does not work. MIDI sounds are missing, the timing is incorrect. Pre-listening to MIDI files in the import dialog is distorted beginning with the second MIDI file. Parts of the first MIDI file are still played back, too. To be sure I installed Debian 12 on a laptop with JACK but MIDI does not work correctly, too. The whole MIDI stack seems to be messed up.

What I tried: Switching to ALSA (Linux Mint), starting ā€œa2jmidid -eā€ and a lot of settings , I did not try everything with the Debian laptop because as soon as I switch back to 7.5 my Linux Mint setup works.

Where should I start debugging, which settings should I check at least for the Debian/JACK system?

Same here, I had to switch back to 7 (7.2).

Is there one session with this problem or many? Are there tempo changes?

Only one session for me, but I only need one session for midi so I donā€™t have any other to try onā€¦

There is no tempo changes on mine, in fact I donā€™t even use the timeline at all (no midi regions), I just send external midi inputs into midi tracks and get the output on the speakers.

Thanks for confirming my issue, hereā€™s how I reproduce the problem:

  • Connect an external device which sends on more than one MIDI channel
  • Create two MIDI tracks
  • Set channel selector to channel 1 for first channel and 2 for the second (recording and playback)
    ardour_channel_selector

As long as I send only on channel 1 everything is fine. As soon as I send on channel 2 there are stuck ā€œendlessā€ notes, missing sounds and so on. Recording is not necessary, even the pre-listening is ā€˜corruptā€™. There are no plugins involved, I set both MIDI input and output to my keyboard/workstation. Clock sync makes no difference.
Switching between JACK2 or ALSA or PipeWireā€™s JACK makes no difference. Last version I tried was Ardour 8.2, 7.5 worked.

How can I help to debug this?

Your description of how to reliably reproduce this issue, was sufficient. Thanks.

Fixed in 8.2-5-gc3b55240b1

3 Likes

I just installed the nightly build and recording several MIDI tracks simultaneously works here:

Thanks a lot for the fix, great project.

2 Likes

@x42 Thank you for the quick fix :slight_smile:
@fraslo Thanks for taking the time to investigate this.

Iā€™m having MIDI issues as well. Using Ardour 8.1 from arch linux repository, and pipewire-jack.

The issues I have noticed for now are:

  • Dropped midi events when playing with a midi controller, especially when using aftertouch/modulation/expression pedal actively. Especially noticable is dropped note off events which causes a note to hang.
  • MIDI event latency when routing to hardware synth. If I increase the audio latency buffer size, the MIDI latency increases as well. Is this normal? Shouldnā€™t be necessary to buffer midi events, they should be sent immediately to the destination port.

Thinking about it, the dropped events and buffered midi events could be related. If I use a lot of expression there will be a lot of midi events. If the events are buffered, we could potentially fill up the buffer, and events are dropped when the buffer is full.

Midi recording with PipeWireā€™s JACK still has problems on my system, too. So I switched to the supported JACK2. PipeWire plays nice with JACK2, just install it and jackdbus, works fine here.

I rebuilt Ardour from git master (0e88df426eee2c0219c02b3e70c8d8337b4a14e1 of 2024-02-17) and I confirm the issue is fixed. Thanks a lot!

1 Like