MIDI strangeness (patch setting and first notes)

I have a MIDI segment that starts at 027|01|0000. There is a patch setting, also at 027|01|0000, and the first notes also start at 027|01|0000. Times are checked with right-click “Edit…” for the notes and double-click edit for the patch.
When I play it (fluidsynth plugin) the patch setting is not processed at the beginning, but some time later.
Inspecting the MIDI file (in the interchange dir) it shows the first note-ons before the patch is set. Playing this file with e.g. timitidy confirms this.

Did I do something wrong?

1 Like

Can you check with “a-MIDI monitor” before the synth plugin? A patch-change should result in two CC messages (bank select CC0, CC32) followed by a program-change.

The ordering of events in the file itself is not relevant (only the timestamp is).

Nevermind. it seems to be an issue with Ardour’s event ordering: In case there are multiple events with the same timestamp, Note-on/off events are preferred over all other events.

Now I think it should be changed to prefer CC, PGM (and SysEX) and send Note events last.

The sort-order is defined in Evoral::Sequence::const_iterator::choose_next():

and fixed in 6.0-pre0-2116-g8dbbc19567

Unfortunately I have problems building Ardour6 from git. Anyone want to look with me? Help is appreciated.

You probably don’t want to do that if the project is important to you. A session created in 6.0 today may not load in 6.0 tomorrow because 6.0 is still changing. The better thing to do is nudge the timing on things in 5.12

Rest assured, no way I’m going to use git builds for production!
But although I can (and do) build 5.12 flawlessly, it bugs me that current git is giving me strange compile/build errors. There are nightlies so it is buildable.