MIDI import failure ?

• Feb 27, 2016 - 14:02

Hello Musescore experts,
I have been importing succesfully lots of MIDI files into musescore, but I have some which utterly fail: only a couple of tracks (parts) are actually imported, while other sequencing/player SW actually see all of them.
Here is one example which plays fine in MS Media player and shows its 13 tracks in Cubase, and when loaded in 2.0.2 (or 1.3 BTW) only shows two drum tracks assigned to channel 10.
Tried exporting it to MIDI from other software but it still fails, and if I delete the two drum tracks then Musescore sees no tracks at all.
Any hint?
Thank-you
Marco

Attachment Size
Hydra.mid 81.23 KB

Comments

In reply to by Shoichi

Grazie Shoichi,
but not quite: your settings just split each individual instrument of the two drum tracks which get imported into its own staff (bass drum, snare drum etc.), which appear then as individual instruments in the Mixer. The MIDI file contains 13 tracks (piano, guitar, etc., just play it to hear) which do not appear at all in Musescore...
What else is wrong?
Thanks

If I start MuseScore from the command line, I see a numebr of MIDI-related error messages when I load this score, including a bunch like this:

parameter number not defined, data 0x0 0x0, tick 180, channel 0

Other errors too. My guess is that this is somehow significant. Maybe some specific MIDI message your file contains that MuseScore doesn't support (and chokes on)?

In reply to by Marc Sabatella

Having examined the MIDI file with the various MIDI tools at my disposal, I am currently concluding that the fact that the first two tracks in the file are consecutively the Title and the lyrics, is throwing the MuseScore SMF parser off somehow.

To all intents and purposes this is a .kar file with a .mid file extension.

I would suggest using a MIDI sequencer to remove the lyric track (will try this myself tomorrow) and see if that solves the problem.

HTH

Which reinforces the concept we keep trying to tell you.......

MIDI is not a suitable format for importing into notation software, and should only be used in moments of desperation.

You will get far better results converting to MusicXML first and then importing the MusicXML file.

Thank-you all for your helpful suggestions.

First of all, as you understand, I did not produce the MIDI file myself, so I had no control on its content.

By experimenting a little bit more on top of what jm6stringer provided, I found out that
- The lyrics track is not involved: even removing it completely from the MIDI file the problem stays.
- Removing DataEntry and RPN events in the first measure of each track allowed Musescore to import all the tracks.
- The imported score (attached) looks rather quirky, and when played within Musescore it sounds way odd with respect to any other MIDI player, as if the tempo is fluctuating wildly within each single measure.
- Primitive ancient freeware such as Noteworthy Reader can actually display and play the MIDI file correctly (both before and after the above tweaks).

The suggestion about MusicXML seems interesting, but it seems that on the web the suggested way to convert a MIDI file to MusicXML is to do it via Musescore, so I am back at square one...

Thanks again
Marco

Attachment Size
Hydra.mscz 94.04 KB

In reply to by Stanislao Moulinski

OK - I have a little more time tomorrow to do some digging.

It is now certain that the problem lies in the chunk of RPNs and other setup data at the beginning of the file.

Once we have isolated which particular one is causing the problem then we can send this to the issue tracker and hopefully it can be sorted.

There is one MIDI code I have not seen before - so maybe that's it.

In reply to by ChurchOrganist

Got it :)

There were 4 Pitch Wheel events at the beginning of track 12 which were causing the problem.

Once these have been removed MuseScore imports the SMF remarkably well given that it is very much a human performance.

I was looking at it in Sonar's notation view just before I went to bed last night, the whole thing is a notation nightmare! I don't think any of the notes start on the beat.

The fluctuations in tempo you are talking about are caused by MuseScore trying to interpret the performance data into notation.

You have to remember that MuseScore is not a midi sequencer, and has to process the midi data into its own format before it can play it back. Consequently there will be timing errors due to human musicians using subtle timing differences in performance from what the notation is saying on the page.

I would say that this particular SMF would require a great deal of quantisation and other editing in a sequencer before it would import into MuseScore and provide a properly readable import.

In reply to by ChurchOrganist

Thank-you ChurchOrganist for pursuing this issue, it's really appreciated.

For me removing the initial pitch bend events is not enough; I did this for track 12 and then also for all other tracks, and still I only get the two percussion tracks imported in Musescore.
Only when I remove also all RPN and Data Entry events as before I get all the tracks being imported.

Thanks also for the suggestion about quantization: I'll do that in Cubase while I remove the above MIDI events.

Marco

In reply to by ChurchOrganist

Mmm...
Your Sonar saved file nicely allows all tracks to be imported in Musescore for me too; and with a MIDI list editor I see that all RPNs and DataEntry events are still there...

Moreover: if I just remove RPN and DataEntry events from the first instrument track only (Fretless), that one (only) imports fine, plus the two usual percussion tracks which always worked (and which had no RPN and DataEntry events since the start).

Indeed it looks as if Sonar while saving does fix something in the file, which has to do with RPN and DataEntry events (which disappears if those are removed entirely).

Now look at this:
The first events in track 2 (Fretless) in the original file
00000:000 M:TrackName Frettless
00000:180 Reset All Controllers 0 0
00000:180 All Notes Off 0 0
00000:180 Reg Param No LSB 0 0
00000:180 Data Entry MSB (LSB) 0 0
00000:180 Reg Param No MSB 0 0
00000:180 Data Entry MSB 12 0
00000:180 PITCH_BEND 8192 0
00000:240 Volume 110 0
00014:010 FX1 Reverb 40 0
00014:020 FX3 Chorus 20 0
00014:030 Expression 110 0
00014:040 Pan 54 0
00014:120 PATCH Synth Brass2 0

and those in your Sonar saved file:
00000:000 M:TrackName Frettless
00000:000 PATCH Synth Brass2 0
00000:000 Volume 110 0
00000:000 Pan 54 0
00000:180 Reset All Controllers 0 0
00000:180 All Notes Off 0 0
00000:180 Reg Param No MSB 0 0
00000:181 Reg Param No LSB 0 0
00000:182 Data Entry MSB 0 0
00000:183 Data Entry MSB (LSB) 0 0
00000:183 Reg Param No MSB 0 0
00000:184 Reg Param No LSB 0 0
00000:185 Data Entry MSB 12 0
00000:186 Data Entry MSB (LSB) 0 0
00000:186 PITCH_BEND 8192 0
00014:010 FX1 Reverb 40 0
00014:020 FX3 Chorus 20 0
00014:030 Expression 110 0

In your version of the file PATCH, Volume and Pan were moved to 0, and all those RPN and DataEntry events, which were all simultaneous, are spread over different times.
I do not know whether it's something illegal according to MIDI specs: maybe some MIDI guru does?

The plot thickens...

In reply to by Stanislao Moulinski

I do seem to remember MuseScore having problems with too many MIDI messages being sent with the same Delta time.

Best practice according to MMA is to spread setup data events such as RPNs over several ticks in order not to flood the receiving system with too much data at once.

I did have a DX27 synth once where I had to spread SysEx block events over time when sending otherwise it crashed the synth - that was in the early days though, when we were still counting system RAM in Kilobytes :) RPNs and NRPNs were unheard of then! They didn't come in until General MIDI in the 90's.

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