BlogResearch
Why MIDI imports look messy in MuseScore, and how to fix them
A MIDI file keeps a performance, not notation. What that did to 12 guitar transcriptions, and what to set before you import.
The short answer
A MIDI file records a performance: which key went down, when, how hard and for how long. Its notes have no sharps or flats, voices, written rests or beams, and the file often has no key signature, so MuseScore has to guess them, and it guesses worst when the notes sit off the beat grid. On 12 guitar transcriptions, our first converter wrote no key signature and hid every rest; MuseScore Studio 4.7.5’s importer, given the same notes on a 16th-note grid at a constant tempo with the key written into every track, got the key right in 10 of 12 and showed every rest. MuseScore Studio 4 has no MIDI import panel, so those fixes go into the MIDI file or into an options file on the command line.
What doesn’t a MIDI file store?
Most of what a reader needs. A MIDI note is a key number from 0 to 127 plus a velocity, sent once when the note starts and again when it stops (MIDI Association). Note 63 is D♯ and E♭ at once; which one to write depends on the key, and the note doesn’t say. A Standard MIDI File can add tempo, time signature and key signature as meta events, but it has no standard place for voices, rests, beams or tuplets. A rest is just a gap, and a length is a count of ticks, not a written value.
Audio-to-MIDI tools add a second problem: their timing comes from a recording, so notes rarely land exactly on a beat. Spotify’s Basic Pitch, which ScoreStarling uses, writes every note into one Electric Piano 1 part at the tempo you give it, with no key signature (note_creation.py). Turning that into notation means choosing, for every note, a spelling, a written length, a voice and a staff. Every converter makes those choices; they differ in how well.
What a simple converter did to 12 guitar transcriptions
Our first notation step was a converter we wrote on the music21 library. We fed it Basic Pitch MIDI from 12 recordings in the public GuitarSet dataset, with each recording’s tempo supplied, and Verovio engraved exactly what it wrote. An audit of those 12 scores found:
- No visible rests in any score: by default, music21’s MusicXML exporter fills gaps with hidden rests (m21ToXml.py).
- No key signature in any score. Pieces in E major showed no sharps, and one accompaniment in C major carried redundant naturals on 153 of its 431 written notes (421 MIDI notes, some split by ties).
- Spelling by note number alone. MIDI note 63 always came out as E♭, even where E major needs D♯; in a piece in G♭ major, 30 of the 49 notes that belong to the key were misspelled.
- Up to five voices on one staff. Note starts and ends were each snapped to the nearest 16th, so a string still ringing under the next note forced another voice, with dots and ties to match.
- Guitar written as piano: 10 of the 12 scores on a grand staff and the other 2 in bass clef, none in guitar clef, because Basic Pitch labels every note Electric Piano.
We re-ran that converter on the same saved MIDI files on October 7, 2026 and got the same counts.
The music font was not the problem. Verovio and its Leipzig font drew what the MusicXML said; the MusicXML was wrong.
Before and after: MuseScore Studio’s importer
We looked at open-source alternatives first: partitura handles key, spelling and voices but has no quantizer and writes no rests, and the other research tools we found were piano-only, unlicensed, non-commercial or unreleased. So we handed the job to MuseScore Studio 4.7.5’s MIDI importer, run as a separate program. Same 12 recordings, same Basic Pitch notes, same supplied tempo, prepared as described below, on a Mac on October 2, 2026:
| Measure | music21 converter | MuseScore importer |
|---|---|---|
| Key signature matches the annotation | 0/12 | 10/12 |
| Notes in the key’s scale spelled against it | 322 of 2,703 | 0 of 3,213 |
| Accidental signs per written note | 0.53 | 0.06 |
| Visible rests | 0 of 1,626 | 988 of 988 |
| Most voices on one staff | 5 | 2 |
| Every MIDI note written | 12/12 | 12/12 |
| 4/4 at the supplied tempo | 12/12 | 12/12 |
The written note counts differ because MuseScore ties notes across beats and barlines differently. The two wrong keys were both a fifth from the annotation: D♭ major for a piece in G♭, B major for one in E. Without our estimate in the file, MuseScore’s own key guess matched only 5 of the 12 (re-run October 7, 2026); writing the estimate in is what raised it to 10. The importer took 1.2–4.3 seconds per recording, 2.3 seconds on average.
Why does MuseScore re-guess the tempo, meter and key?
Because unquantized MIDI looks like a live performance to it. The importer checks the notes that fall near a beat, and if fewer than 60% of them start right on it, it treats the file as a human performance (importmidi_quant.cpp). It then runs its own beat tracker, picks a meter and stretches note times to fit the beats it found. MuseScore’s older handbook describes that mode as trading accuracy for readability and says it is on by default for unaligned files.
The key has a rule of its own. If any non-drum track lacks a key signature, or the file counts as a performance, the importer estimates the key from the notes (importmidi_key.cpp). So a key signature in the tempo track alone is not enough: every track with notes needs one. With raw Basic Pitch MIDI we saw meter, tempo and key all re-guessed, even with the human-performance option set to false.
How should you prepare MIDI before importing it?
Make the notation decisions you can inside the MIDI file, before MuseScore sees it. This is what we do to every transcription:
- Use one constant tempo. ScoreStarling uses the BPM you set, or one it detects from the recording; in a DAW, record to a click or match the project tempo to the take.
- Move every note’s start and end onto a grid of the shortest value you want to read. The October 2 test here used 16th notes in 4/4. With every note on the grid, MuseScore reads the file as written music rather than as a performance.
- Put the tempo and time signature in the first track, and a key signature in every track that has notes. We estimate the key from the notes with music21’s Krumhansl–Schmuckler key finder; if you know the real key, use it.
- Give each track its real instrument. MuseScore picks staves and clefs from the General MIDI program: a guitar left as Electric Piano lands on a grand staff, while a nylon-string guitar program gets treble clef with an 8 below.
- Watch repeated notes. If one pitch is struck twice within a single grid step, snapping merges the two attacks; we place the second one a 32nd later.
Which MuseScore import settings should you use?
MuseScore Studio 4 has no import panel to set them in. Its handbook calls the MIDI import panel “not currently implemented”, and the GitHub issue to restore it (#11918, opened in June 2022) was still open when we checked on October 3, 2026. Inside the app, the only quantization control is the shortest note value for imported MIDI files, under Preferences → Import.
The importer still reads its main options from a file passed on the command line with -M; the handbook’s command-line page links a sample. This is the file the October 2 test used; ScoreStarling now writes a melody line in one voice (VoiceCount 0) and turns RecognizePickupBar on when the first bar is a pickup:
<?xml version="1.0" encoding="UTF-8"?>
<MidiOptions>
<QuantValue>2</QuantValue>
<VoiceCount>1</VoiceCount>
<Duplets>false</Duplets>
<Triplets>false</Triplets>
<Quadruplets>false</Quadruplets>
<Quintuplets>false</Quintuplets>
<Septuplets>false</Septuplets>
<Nonuplets>false</Nonuplets>
<HumanPerformance>false</HumanPerformance>
<MeasureCount2xLess>false</MeasureCount2xLess>
<SplitStaff>false</SplitStaff>
<ClefChanges>false</ClefChanges>
<SimplifyDurations>true</SimplifyDurations>
<ShowStaccato>false</ShowStaccato>
<DottedNotes>true</DottedNotes>
<RecognizePickupBar>false</RecognizePickupBar>
<Swing>0</Swing>
</MidiOptions>
Then convert, naming the output as MusicXML:
mscore -M midi-import.xml -o score.musicxml performance.mid
The program’s name and location depend on your system; on Windows the handbook uses MuseScore4.exe. What the main options do:
| Option | Value | Effect |
|---|---|---|
| QuantValue | 2 | Shortest written value: 16th notes (1 is 8ths, 3 is 32nds) |
| VoiceCount | 1 | At most two voices per staff; the count is the value plus one |
| Triplets and other tuplets | false | No tuplet search, because our grid has no tuplets |
| HumanPerformance | false | Don’t treat the file as a live performance; this holds only when the notes are on the grid |
| SplitStaff | false, true for piano | Splits a piano part between the hands; for other instruments MuseScore makes separate parts instead |
| SimplifyDurations | true | Fewer rests and simpler note values |
| ClefChanges | false | No small clef changes inside a staff |
| RecognizePickupBar | false | The first bar is a full bar |
| Swing | 0 | No swing detection |
If your music has triplets, don’t snap it to a straight grid, and leave Triplets on; we haven’t measured how well MuseScore finds them. In MuseScore 3 the same choices sat in an import panel, with columns such as Max. voices, Search tuplets and Is human performance.
What does the tidier score cost?
Some accuracy, mostly in note lengths. These are the trade-offs we measured or know of:
- MuseScore wrote 26% of the notes longer than the quantized performance, by up to three 16ths and never shorter, and notes sounding together with different lengths can share one value. In ScoreStarling, playback and MIDI exports keep the performed timing, though a melody line is cleaned first: of notes struck together the strongest stays, faint echoes go, and a held note ends where the next begins.
- The key is estimated from the notes and was wrong in 2 of 12 cases, each time a fifth away. Keys with seven sharps or flats are written as their five-accidental equivalents.
- The straight 16th-note grid in this October 2 guitar test did not represent triplets or swing. That is still true when ScoreStarling transcribes one instrument or voice, which starts in 4/4; for solo piano it follows the playing’s bars and can choose 4/4, 3/4, 6/8 or 12/8. If you prepare a file yourself, write its real time signature in.
- MuseScore splits piano chords between the hands by its own rule, and even close two-note chords can land on different staves.
Some of this can be cleaned up after import. Tools → Regroup rhythms rewrites a selected passage so that notes group by beat, without changing the rhythm itself. Tools → Respell pitches with sharps or with flats changes spelling, though the handbook says it is meant for notes of a single pitch. A wrong key is quicker to fix in the MIDI file before import than note by note afterwards.
Can MuseScore turn an MP3 into sheet music?
MuseScore Studio can’t: it opens score formats such as MusicXML and MIDI, not audio. Muse Group announced an Audio-to-Score beta on MuseScore’s web platform on August 17, 2026: solo piano and acoustic guitar, MP3 files up to 30 MB (about three minutes), free, returned as an MSCZ file for MuseScore Studio. We haven’t tested it.
The other route is the one in this article: an audio-to-MIDI model, preparation of its timing, then MuseScore’s importer. ScoreStarling works this way for one instrument or voice, with Basic Pitch, and for solo piano, with a piano model whose notes also give the pulse and bar lines; Verovio draws the page. A single-note line is now written on one staff in one voice, a part playing chords keeps them on one staff, and Score settings → Layout can change how a single-part recording is written. The measurements above are from October 2. An October 4 re-run, after melodies began to be written one note at a time on one staff, again matched the key in 10 of 12, spelled 0 of 3,158 in-key notes against it and showed all 357 rests.
You can also choose or drop a MIDI file in ScoreStarling and get an editable score; it leaves out drum tracks and keeps one time signature for the whole score. A recording is transcribed for its first five minutes, from an upload of up to 100 MiB. PDFs are free and MusicXML needs the score unlocked (15 credits, once); the specifications have the rest (checked October 7, 2026). The workspace is free to start; the accuracy article keeps the dated guitar and band measurements.
Sources
- Summary of MIDI 1.0 Messages — MIDI Association
- Meta Message Types — mido documentation
- basic_pitch/note_creation.py — Spotify Basic Pitch, GitHub
- music21/musicxml/m21ToXml.py — music21, GitHub
- GuitarSet 1.1.0 — Xi et al., Zenodo (CC BY 4.0)
- MIDI import — MuseScore 4 handbook
- Restore MIDI import panel, issue #11918 — MuseScore, GitHub
- importmidi_quant.cpp and importmidi_key.cpp — MuseScore source, GitHub
- MIDI import — earlier MuseScore handbook (import panel)
- Command line usage and its sample MIDI import options file — MuseScore Studio Handbook
- Preferences, File export, Regroup rhythms and Respell pitches — MuseScore Studio Handbook
- Hear It, Play It: MuseScore Introduces New Smart Audio Recognition Features — Muse Group, August 17, 2026
Questions and answers
How do I convert MIDI to MusicXML?
Open the MIDI file in MuseScore Studio, choose File → Export and pick MusicXML; compressed .mxl is the default. From a terminal, mscore -o score.musicxml file.mid does the same, and -M adds an options file for quantization and voices. Prepare the MIDI first, or the MusicXML will carry the same mess.
Why are there so many ties and dotted notes after a MIDI import?
Because performed notes rarely end on a beat. Snapped to a fine grid, they cross beats and barlines and need ties, and notes that overlap spill into extra voices. Quantize to the shortest value you want to read, cap the importer at two voices and let it simplify durations; MuseScore will then write some notes slightly longer to tidy the page.
Why does MuseScore write D♯ where I expected E♭?
MIDI stores note 63 without a spelling, so MuseScore spells from the key signature, and if a track has none it estimates the key itself. Write the right key signature into every track before importing. After import, Tools → Respell pitches with sharps or with flats changes selected notes of the same pitch.
Can I get the MuseScore 3 MIDI import panel in MuseScore Studio 4?
Not as of October 3, 2026: the panel hasn’t been ported, and GitHub issue #11918 to restore it is still open. MuseScore Studio 4 keeps a shortest-note preference for imported MIDI, and its command line accepts an options file with -M that covers the panel’s main choices.
Can I open a ScoreStarling transcription in MuseScore?
Yes. Export MusicXML (.musicxml or .mxl), which keeps the key signature, spelling, rests and voices, or MIDI if you only need the notes. Both need the score unlocked, which costs 15 credits once. ScoreStarling is free to start, and every transcription is a first draft to check by ear.