MIDI import: note durations don't add to a whole measure

Project:MuseScore
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

When importing a MIDI file, in some measures, adding the notes+rests durations, the result does not equal to a whole measure, but a little more.

Using MuseScore 0.9.6 rev 2613 (compiled from svn) in openSUSE 11.2 with Qt 4.6.1.

How to reproduce: open MuseScore, File->Open, open the attached MIDI file.
Go to measures 17, 18, etc. in staff 3 and 10.
As you see the rests are off by a 1/16th note.

Attached are screenshots of how the bug looks, and how it should be (entered by hand).

Also, probably unrelated, when I select a whole measure and press delete, the first note of the next measure is also deleted.

AttachmentSize
latraviata-preludio-mio.mid15.36 KB
mscore-import-bug.png30.78 KB
mscore-import-bug-correct.png17.38 KB
#1

Attached a simpler testcase.

Seems like the bug is related to dotted notes.

AttachmentSize
prueba.mid 101 bytes
#2

Previous attached mid file -> musicXML with Sibelius 5.

AttachmentSize
prueba.xml 7 KB
#3

The same with Rosegarden (also wrong, but closer):

AttachmentSize
prueba-rosegarden.xml 1.55 KB
#4

Expected result.

AttachmentSize
expected-result.jpg 6.83 KB
#5

Attached a new testcase.

Also, the result with mscore-0-9-6 (r3034) and the expected result.
Seems that is having problems at the end, when a note should be broken into 3 to write it properly.

AttachmentSize
prueba2.mid 111 bytes
mscore-newpatch.jpg 9.73 KB
mscore-newpatch-expected.jpg 8.13 KB
#6

r3036 (0-9-6 branch) now looks as expected.

#7

The 2 MIDI files attached take forever to load since the first patch.
I think there is an endless loop somewhere.

I'll try to find a smaller testcase.

AttachmentSize
latraviata-preludio-mio.mid 15.36 KB
Egmont.mid 184.42 KB
#8

Ok, I got one, although I don't know if it's the cause of the hangs.

Testcase attached, with current behavior and expected result.

AttachmentSize
prueba4.mid 91 bytes
mscore-patch2.jpg 22.83 KB
mscore-patch2-expected.jpg 24.98 KB
#9

r3039 does not hang anymore and prueba4.mid looks ok to me (but is rendered without dotted rests)

#10

The following files (from above) look okay but they do not sound correct when you press Play.

prueba4.mid actually starts with the last note then plays the first note.

latraviata-preludio-mio.mid actually starts with the last chord and holds the note continuously when it proceeds back to the beginning.

Egmont.mid starts from the beginning but it also holds first the chord continuously.

#11

r3064 fixes the onset time of last imported note for playback.

Syndicate content