Import from a midi file
Issue type
Engraving bug (incorrect score rendering)
Description with steps to reproduce
Mscz file : http://aroug50.free.fr/03-mark_knopfler_1996-golden_heart-[k].mscz midi file : http://aroug50.free.fr/03-mark_knopfler_1996-golden_heart-[k].mid
the mscz file is an import from the midi file (same result for MS3 and MS4). Measure 53, "Saxophone Soprano MK vocal" part see 2 voices (polyphonic) but midi file is really monophonic ! Bug ?? How could we have a monophonic part ?
Supporting files, videos and screenshots
midi file : http://aroug50.free.fr/03-mark_knopfler_1996-golden_heart-[k].mid MS3 / 4 file : http://aroug50.free.fr/03-mark_knopfler_1996-golden_heart-[k].mscz
the MS file is an import from the midi file. Measure 53 / "Saxophone Soprano, MK vocal" part : the midi file is monophonic but the MS file is polyphonic (2 voices). Bug or not ? How could we have a monophonic MS file ?
What is the latest version of MuseScore Studio where this issue is present?
4
Regression
No.
Operating system
windows 10
Additional context
No response
Checklist
- [x] This report follows the guidelines for reporting bugs and issues
- [x] I have verified that this issue has not been logged before, by searching the issue tracker for similar issues
- [x] I have attached all requested files and information to this report
- [x] I have attempted to identify the root problem as concisely as possible, and have used minimal reproducible examples where possible
I am unable to download the files from the unsecured site you list - can you please ZIP and attach your files directly here?
I can confirm that the MIDI note on'off data does not appear to show any overlap between notes - the second half of the measure should just be four eighth notes (the last tied over the barline). However, I don't know how to read the lyric info; it might somehow be confusing things here.
No matter the lyrics : only the length of each note is important ... The "bug" is that midi importation change the length of some notes, not ?
Well, the bug appears to be that the E that should have been placed on beat 4 was instead placed a sixteenth early and thus overlapped the previous F#. But what I don't know is if the reason this happens is sdoemthing having to do the the lyrics - like if they contained conflicting timing information that MuseScore is trying to reconcile with the timing of the notes themselves Again, I don't know how to interpret lyric data, so I simply cannot say. I am simply providing a little info for use by whichever developer ends up investigating further.
03-mark_knopfler_1996-golden_heart-[k].mid_analyse.ods
This is an analyse of the midi file ... lines 10977 to lines 10997 describe the timing of each "note on" / "note off" ! And this trouble come in another parts without lyrics !
This is actually a very difficult issue to interpret because a clear issue hasn't been identified in the description.
We cannot prioritise investigating issues if they don't conform to our issue reporting guidelines. It would help us if the title could indicate more precisely what the issue actually is ("Import from a midi file" doesn't help us at all), and if a minimum reproducible example could be provided – ideally with screenshots/videos – in the description.
Based on the discussion, I can summarize the issue pretty clearly, I think:
Title: Some notes in MIDI file are placed on the wrong beat, forcing use of multiple voices unnecessarily
Description: In the attached MIDI file, in the track labeled "MK Vocal", the notes in measure 53 are quantized to eighth note boundaries with no overlap, and yet the import shows notes on sixteenth note boundaries with overlap. In particular, there is a concert D4 on beat 4 (tick 1440) that upon import shows in the score as being on the last sixteenth of beat 3 instead. This causes the note to overlap with the previous quarter note on beat 3, thus requiring multiple voices that shouldn't be necessary.
Here is the MIDI data for the measure in question:
Unpacking this a little, the "note on" messages are G3 at 102000, G4 at 102240, F#4 at 102720, E4 at 102960, D4 at 103200, and E4 at 103440. Each "note on" is preceded by the corresponding "note off" so there are no overlaps. It seems that measure 53 starts at tick 101760, so relatively speaking, those are ticks 240, 480, 960, 1200, 1440, and 1680. Each of those ticks is divisible by 240, so no note should be starting on anything but an eighth note boundary. Those correspond to beats 1&, 2, 3, 3&, 4, 4&. The concert pitch results should thus be the following:
Instead, we get this (after enabling concert pitch and fixing the key signature):
The last two notes - D4 and E4 - are incorrectly placed, showing up on 3a and 4 instead of 4 and 4&, and thus overlapping the previous note and each other. Not sure why. Maybe something in the lyric data is messing things up, or maybe my analysis is off. I'm definitely confused as to why measure 53 seems to start at tick 534480 instead of 524480, but that's what the MIDI-dump site I am using (https://g200kg.github.io/midi-dump/) shows.
Very clear !! Yes that's it !
I've made my own : https://aroug.eu/Mykaraok/MyKarFab.php :) 1) set "Analyse du fichier Midi ?" ON 2) then open the midi/kar file
Precisions : a) I've delete the firt measure (who is empty) after importing midi file in MuseScore : this is explain the "tick 534480 instead of 524480" (Sorry). b) it is important to undestand that a "melody track" MUST be monophonic (one only voice) because we can't song 2 notes simultaneaous. c) this is not "bad beat" but "bad length" (duration)
I summarize another way :
TITLE : Importing a midi file - length (duration) of some notes are bad
thinking : I suppose that MuseScore use a quantification process during importation. I believe this is during the process that disfunction will appear !
You will need to reopen this issue and copy my description to the original at top, so developers don't have to read through the entire thread or open ZIP files containing further explanation. Or just open a new issue, taking care that all the relevent info is right there in the issue report, not buried in comments.
Also, if you read my description, you will see that is both bad start beat and bad duration. The concert D4 needs to arrive on beat 4, and the E4 needs to arrive on 4&. Both arrive early.
OK ... (sorry) : you are right !