Spelling issues on MIDI Import

I’m encountering severe spelling issues when importing MIDI for chromatic music. This has been going forever and it’s unfortunately not fixed in 3.1 either.

If you import file 1, the result is very convoluted, with the result starting with a rather awkward Bb-Abb instead of G#-A
But if you import file 2, that is a subset of file 1 stopping at bar 6, then you get the expected spelling.

Therefore, my theory is that the retrospective re-spelling feature is causing it by interpreting the entire MIDI file as one long phrase. Unfortunately there is no option to disable phrase-based spelling for MIDI import, only for MIDI input.

This is preventing MIDI Import on a very high number of scores, especially when coming from Key-agnostic sequencers like Cubase. The current workaround for me is to use Sibelius as an intermediate stop and then go to Dorico via XML, but this has obvious drawbacks, including not taking advantage of the generally superior spelling logic from Dorico.
Dorico enharmonics tests.zip (564 Bytes)

I’m sure I must be missing something, Marco, but neither of your MIDI files import any notes at all (though I can see that they each have a handful of notes inside them). Do you have any other MIDI files that demonstrate your issue?

You’re correct that Dorico does use its algorithm for determining optimal spelling over the whole flow, and there’s no option to disable that. But even if there were, I’m not convinced the result would be any better, because some algorithm for spelling would still have to be employed in order to produce any result at all.

Hi Daniel, I just exported these other files here, and they work both “Importing” and “Opening”.
File 3 includes an entire phrase, file 4 just the initial interval. The recursive adjustment in file 3 ends up spelling the same first interval using double flats. Dropbox here if you have issues with the attachment: Dropbox - Error
I totally agree with you, just to add to it, inputting this same passage with a MIDI keyboard works as expected, I can see the first note starting off as a Ab but then getting changed as a G# after I input the A natural after it. It would seem that importing the midi, the initial Ab is instead left as is, and then the second A is adjusted to a Bbb.
I observed this a handful of times with different midi files, and it always gets progressively worse the longer the midi is. Hope it helps.
MIDI reexports.zip (514 Bytes)

Dorico runs a different spelling algorithm over the whole flow after MIDI import; the one that is used during note input can’t be used because that one works note by note (with a moving window for context). The algorithm that is used for imported MIDI favours tonal music and does an excellent job with that, but it’s certainly possible that highly chromatic passages without an obvious tonal centre will be a pathological case for the algorithm.

It makes total sense, and I would also think that this habit in film music of having scores without key signature makes any diatonic passage not in C contextually appear as a chromatic passage, because no tonality is defined to frame the music into.
Thanks for the insight, it’s one of those niche things apparently, and I’m somehow destined to always voice one of those!! :laughing:
I remember reading somewhere about a command for batch respelling being in consideration in future updates, so maybe it’ll be possible to clean up double alterations with that, in the meantime it can be managed.
Thanks as always!

What would happen if one imported the MIDI into a specific key (is that possible) and then retroactively changed the key sig to “no key”? Would the spellings of the notes change?

MIDI files can include key signatures and Dorico reads them, so I guess they would affect the note spelling.

MIDI files cannot be assigned a key signature if coming from, for example, Cubase, and I believe Pro Tools as well. Importing into a a Key Signature is not possible because importing always creates a new flow. Changing the key after the fact is not producing a respelling in my case.

You can at least clean up double flats and sharps by selecting the whole flow and using Write > Transpose to transpose by a perfect unison, choosing the option to avoid double accidentals.

That’s a good idea, thanks!

Great success with the transpose to perfect unison to clean up double accidentals here, thanks a lot!
Just some additional thinking on this, out of curiosity. Since there are other genres using C-scores besides film music, would an option in the Transpose panel allowing us to specify an arbitrary key signature for the algorithm to use when making judgement of the respelling help? For example, to make sure intervals are treated correctly if the music is diatonic in a non-C key, but with no key-signature. I realized this only applies to MIDI import at the moment.

That’s an interesting idea. We’ve certainly talked about implementing spelling tables that would allow you to spell the music according to a particular key, but this would be another option.