From 6dfca90b8e715361fe310d907ff315ec162e40a5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 17 Nov 2025 14:39:06 -0700 Subject: [PATCH] fix illegal MIDI event message during import This happens when reimporting a MIDI file taken from Ardour, which has sequencer specific data (namely, note-IDs). In that case SMF::read_event() returns zero to indicate a meta event that we should or could be interested in. For import, we are not interested, hence the ignored_note_id variable --- libs/ardour/import.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index cd3ab08f7f..4fb85f8686 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -405,6 +405,11 @@ write_midi_type0_data_to_one_file (Evoral::SMF* source, ImportStatus& status, si continue; } + if (ret == 0) { + /* set note id, but we ignored it */ + continue; + } + if (size > bufsize) { bufsize = size; }