Wrong key when importing .midi file

• Apr 27, 2020 - 17:18

I've constructed a song in FL Studio, and exported it as a .midi file. I can import the midi file to musescore and play it back. It sounds just like its supposed to. However, the song is clearly in D minor, but musescore writes it as if it were to be in F# minor. So almost all my notes have some b or # before it.

How do i change my song, so that each note sounds the same, but is not written wrong?
Example: Musescore writes a Bb as an a#. How do i make it write Bb, for all my notes?


Did you specify the key in the MIDI file, and does your software export it? It so, then MuseScore should be able to see that. So I'd suggest fixing it in your MIDI software and trying again. Failing that, you can add the proper key signature from the palette, then try Tools / Respell Pitches which might do the right thing pretty automatically, or Ctrl+A to select all then Up then Down, which will definitely respell all accidental with flats, and you can then correct the Db's to C# by right-clicking one, Select / More / Same note name, then Down then Up.

If you contain to have trouble, we can help further if you attach your score.

In reply to by Marc Sabatella

No. I save something in c major using Sonar. Musescore opens that file in B##. There is no excuse for that. If I transpose it in Sonar to Eb then Musescore opens it in D#. There is no workaround. I try transposing it in Musescore a few times to see if it will adjust but no! Also try transposing it up and down a half step, whole step, many steps but it keeps preserving the ridiculous interpretation of the key of the piece. This is a real shortfall of this software. Going through a large piece using Tools / Respell Pitches is a ridiculous solution.

In reply to by John Gessner

MuseScore does not have a key if B#, and if it did, it wouldn’t be the same as C. Perhaps you mean B#? There is also no key of D#, so MuseScore cannot possibly be doing that - it lacks the ability to d generate keys with double sharps.

Anyhow, if your MIDI program puts key signature info into the various tracks, MuseScore does recognize it. Even if your program fails to do add the key signature I do to the tracks, I’ve never heard of a case where it would choose B# over C. If you have found such a rare case, please attach it so we can investigate.

Meanwhile, it’s simple enough to take a piece in B# and transpose it to C, just use Tools / Transpose. Again, if you have difficulty, just attach the score and we’re happy to assist further.

In reply to by John Gessner

It would be useful to see the MIDI file that produced this, so we can understand if it truly had the correct signatures in the tracks or not.

But for the record, the key signature here is B, not B## or B#. But the notes themselves are the key of C. So you don't really need to transpose it, just respell the melody. Lots of possible ways of going about that. but since the spellings chosen right now are pretty arbitrary as it is, I wouldn't be worried about preserving them. Instead, I'd fix the key signature as mentioned (just add the right one from the palette) then try any of the following to see which happens to produce spelling your like best as a starting point:

1) Ctrl+A, Down, Up - respells all as diatonic pitches or sharps


2) Ctrl+A, Up, Down - respells all as diatonic pitches or flats

In this particular example, the "correct" spelling based on the melody is mostly flats, so I'd go with 2. In other melodies, 1. In most cases, though, it's just a given that you'll need to go through and fine-tune spelling of accidentals yourself, because MIDI simply lacks that info.

In some cases, you might also happen to get good results with

3) Ctrl+A, Tools / Respell Pitches - respells according to an algorithm published in a research paper once upon a time

But in my experience, it's often simpler to just do 1 or 2 as your starting point.

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