MuseScore MIDI Import error - while reading Samplitude MIDI Export file

• Dec 7, 2020 - 19:30

Hi,
I exported a MIDI file with Samplitude Music Studio 2014.
Due to an error in creating MIDI files, Samplitude inserts unused bytes between Tracks.
( newer versions up to the actual Samplitude release may still have this bug .. )

So MuseScore fails to load the exported MIDI file.
=> MuseScore Error message: "bad midifile: MTrk expected"

As Windows' MediaPlayer plays the MIDI file with no error,
I tried to find out how to fix the bug on loading a MIDI file.

Fix looks like this:
- Fileread pointer should point to "MTrk", but there is no, so ..
- step up for up to 8 bytes to try to find "MTrk" (loop byte for byte)
- If not found (or EOF ..), stop reading => file error
- if found, continue reading file

MuseScore Version: 3.5.2.311459983 under Windows 10 (actual stable release)

Cheers, Peter

Attachment Size
Only Bass n Drums.mid 12.48 KB

Comments

Do you still have an unanswered question? Please log in first to post your question.