Staccato on notes when i export sheet music to midi

• Aug 12, 2021 - 10:18

Hello everyone,
For some time now I have been having a very annoying problem with musescore. When I create a music score in mscz format and I want to export it to midi a strange thing happens. Once the midi file has been created, when I open it with musescore, certain notes are "staccato" which were not originally!
The strange thing is that the mscz file remains unchanged. Only the midi has this annoying problem. The staccato appear literally at random on some notes. I attach a score that gives me this problem in the conversion.

Instructions to reproduce the bug:
- Open the mscz file with musescore
- Export it to midi
- Open the midi with musescore
You will notice that some notes are now staccato and were not staccato before!

I use musescore version 3.6.2, which is the latest version for my linux distribution.

Attachment Size
signore_delle_cime_organo.mscz 19.4 KB

Comments

Any midi you open in MuseScore is going to have issues. The more important question is how does the midi open in a Daw, for example. In other words, what are you making midis for?

In reply to by bobjp

I use midi with a DAW to play them with VSTs. Also, a midi file is much more compatible, I can open it in almost any music program. Mscz files don't have that capability. Finally, midi files take up much less space on my hard drive, which is very convenient for me.
It is true that MuseScore loses the formatting when it opens a midi file but it always opens them correctly. The problem is in the export. I notice that the extra staccato that MuseScore sees in the midi are really there. This is because even my VSTs with the DAW play them. Can this bug be fixed?

I'm slightly confused by this result and not convinced the issue is the MIDI export.
The confusing thing is that these staccato happen on the first measure, but not on the second.

But here is how the exported MIDI looks like in MidiEditor:
323749-non-staccato-midi.png
No shortening of the note at all, it stops just one tick short of when the next note begins.

Of course a MIDI file is smaller, it throws out all notation information and contains playback instructions only. That's also why MuseScore is left guessing on some accounts when re-importing such a MIDI file (although in this case I agree that staccato is a bad choice here).
You can during import just uncheck the "show staccato" option though, so there's that.

If you're looking for a file format to exchange a score, go for MusicXML. MIDI should only be your last resort as (you by now have experienced and know) it throws out tons of notational nuances.

In reply to by jeetee

I use MIDI files precisely because I have no need to save "graphic" data from the score. I simply need the essential data of the notes (start, end, pitch, dynamics). MIDI is perfect and that's why I use it a lot with MuseScore and my DAW.
As for what you noticed with MidiEditor, I can confirm that too. I'm still convinced that the problem is in the MIDI export from MuseScore because my DAW also plays those notes staccato.
I believe that the staccato is a "property" of the single note that only modifies its duration during playback. That's why from MidiEditor everything seems normal.
Another thing that confirms this is that if I delete a note from my DAW that is played with staccato and recreate it with the same duration, the problem disappears.

I will try using the MusicXML files but I'm not sure if my DAW supports them.
Bye for now,
Claudio.

In reply to by jeetee

Ok i believe you. But how i could solve this problem? It seems that only MidiEditor can open the file correctly... it's really a mystery. MuseScore and the DAW see the staccato also where there isn't. MidiEditor doesn't. I really can't understand that.

In reply to by belluzzi.

As mentioned I do find some oddities going on as well.
One is that the staccato is not happening on all the staves, whilst MidiEditor is clearly showing exact the same durations for all of them:
323749-import-comparison.png
Interestingly enough, for that 2nd measure I'm only seeing three single track notes in MidiEditor, but I think that's because they share the same channel.

At closer inspection of the score it seems to me that the staccatos are possibly caused by the fact that you have the same pitch in the same channel overlapping; in which case one of them gets filtered out (you can't strike the same note twice simultaneously on a single keyboard instrument). I'm wondering whether this would/could somehow have an impact.

In reply to by jeetee

And indeed after dropping the pedal line one octave down for those first two measures: no more staccato in the left hand:
323749-non-overlapping-notes.png

And the same becomes true when I move the overlapping notes between left/right hands as well:
323749-non-overlapping-notes-bis.png

So at least this seems to point at the root cause for this; although I don't see a duration difference in those notes when looking at the different midi files with MidiEditor, so that part is still confusing...

In reply to by jeetee

I was coming here to tell you the same thing but apparently you found out before me XD. This behaviour of MuseScore is really interesting. Probably when two MIDI tracks merge into the same note a bug makes them like staccato for MuseScore. I can't really explain why. It's probably a bug that's always been there in MIDI files and MuseScore interprets it in its own way by adding a fake staccato. At least i understood why this happens. Now it's much more easier to avoid the problem. Thank you for your help. You've been really kind.
Bye,
Claudio.

I don't have tools to examine MIDI data, but from what I see, this seems a pretty expected result of the fact that a MIDi channel a single data stream and if you send two "note on" messages for the same pitch follow by two "note off" messages, results will be strange. That's because the second "note on" message basically kills the first note, then the first "note off" message kills the second, and the second "note off" has nothing to do. Something like that anyhow. Moral of the story being - don't send the same note out twice on the same channel.

In reply to by Marc Sabatella

That was the problem and fortunately we were able to solve it. I'm wondering if maybe you should specify in the MuseScore documentation in the MIDI section that when exporting a piece from an instrument like piano and organ you should separate each line into separate midi channels. So for the piano you would need two separate pianos. But for the organ you need 3 separate organs. This way the problem will be avoided in every case.

In reply to by belluzzi.

You don't normally need that, because for piano at least, you wouldn't have the same note played by both hands :-). On organ, I could see that being an issue though, with two manuals and pedals, but even so, it plays the same way, so even here it's only an issue if you for some reason export and then re-import - a pretty unusual thing to do, since it loses so much information.

For the vast majority of purposes it doesn't matter, but if you are exporting to MIDI and then planning on re-importing, it's good know. So feel free to edit the Handbook section on MIDI import and/or export to mention this - the Handbook, like the software, is open source.

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