Audio → MIDI

Audio to MIDI Converter

Vocal to MIDI: why lyrics don't become notes cleanly

The short answer: because the converter never hears words. It measures two things per frame — a pitch and a loudness — and it re-measures them every 11.610 ms. There is no phoneme model, no syllable model and no text output anywhere in the chain: when we wrote a two-note .mid with this site’s own writer, the file came to 71 bytes and contained exactly three meta events — tempo, time signature and end-of-track. No lyric event, no text event, no track name. So the words cannot be in the result, even in principle. What survives is the part of the voice that behaves like a pitch: the vowels and other voiced sounds. The rest is treated as noise or as silence. A 200 ms “s” measured 0 notes in monophonic mode and 14 spurious notes in polyphonic mode, all of them in the top two octaves. One syllable can give you at most one note, several syllables can collapse into one, and the lyric is gone.

1. Two numbers per frame, and nothing else

Audio is resampled to 22 050 Hz and cut into 2048-sample windows stepped forward 256 samples at a time. Each frame is 11.610 ms long, which is 86.13 frames a second. Inside a frame the analyser does one of two things depending on the mode:

Neither path has any notion of a phone, a syllable, a word or a phrase. A sung sentence and a bowed cello line are the same kind of input to this code: a series of frames with a pitch and a level. That is the root of every failure below — not a bug, a scope.

2. The exported file contains no text at all

This is worth stating separately, because it settles the question. The MIDI writer builds two tracks: one holding tempo and time signature, one holding note-on and note-off events. We dumped the bytes of a two-note export at 120 BPM:

Every meta event in a two-note export from this converter, read straight out of the file bytes.
Meta typeMeaningPresent
0x51TempoYes
0x58Time signatureYes
0x2FEnd of trackYes
0x05LyricNo
0x01TextNo
0x03Track nameNo

The whole file was 71 bytes for two notes. A lyric meta event is a standard part of the MIDI specification and a karaoke file uses it, so this is not a format limitation — the writer simply never emits one. If you need the words attached to the notes, you add them in a DAW on a lyric or text track after the import. Nothing in the conversion will supply them. What is actually inside a MIDI file covers the rest of that structure.

3. Voiced and unvoiced sounds are opposites to this engine

Speech sounds split into two families, and the split maps exactly onto what the analyser can and cannot use.

Measured on this converter's own code. “Voiced” sounds have a harmonic series; “unvoiced” ones are broadband noise.
Sound familyExamplesWhat it isMonophonic resultPolyphonic result
Vowelsah, ee, ooHarmonic series with moving formantsOne noteOne note, plus formant ghosts
Nasals, liquidsm, n, l, rWeaker harmonic seriesUsually one noteOne note, often with ghosts
Fricativess, sh, f, thBroadband noise0 notes6–18 spurious notes
Plosivesp, t, k, b, d, gShort burst or brief silenceNothing, or a gapUnstable bursts

The fricative row is the one that surprises people. A 200 ms noise burst at a moderate level returned zero notes in monophonic mode on all three test seeds, because broadband noise has no harmonic series to sum and the harmonicity gate rejects the frame. The same burst in polyphonic mode returned 14, 14 and 15 notes across those three seeds — and because noise peaks land wherever the spectrum happens to be loudest, they scattered across the top two octaves, from D4 up to B7. Nothing about that cluster is stable between runs.

4. In polyphonic mode, a longer consonant means more ghost notes

We held the fricative level fixed and varied only its length. The count of spurious notes rose with it:

A single unvoiced fricative, polyphonic mode, sensitivity 60, shortest note 60 ms. Note count is for the noise burst alone.
Fricative lengthSpurious notes in poly modeNotes in mono mode
40 ms60
80 ms80
120 ms100
160 ms120
200 ms140
300 ms180

So the choice of mode decides whether your consonants are silent or loud and wrong. For a solo vocal take, monophonic mode is the one that keeps consonants out of the result. If you use polyphonic mode on a voice, expect to delete a spray of high notes on every sibilant — and expect the exact pitches to differ each time you convert, because they come from noise, not from the singer.

5. Why one syllable is not one note

The intuitive model — each syllable becomes a note — is wrong in both directions: some syllables produce nothing, and some sequences of syllables produce a single note.

A vowel has to last about 0.12 s

Holding everything else constant and shortening a vowel, the output falls off a cliff rather than fading:

One sung vowel at A4, monophonic mode, sensitivity 60, shortest note 60 ms.
Vowel lengthNotes returned
40 ms0
60 ms0
80 ms0
100 ms0
120 ms1
150 ms1
200 ms1

The shortest-note control was set to 60 ms, which the code turns into 5 frames — 58.05 ms — so the 100 ms vowel should have cleared it. It did not, because the frames at each end of a short vowel are still ramping up and down, and the ones that survive fall below the minimum frame count. The practical floor is about 0.12 s of steady vowel. That sets a ceiling on syllable rate: at 0.12 s per vowel plus 0.12 s of consonant, a syllable occupies 0.24 s, so roughly four syllables a second is the most a lyric can be sung and still be transcribed. A fast phrase in a pop vocal runs above that, and the fast syllables simply do not appear.

Vowels on a harmonic series collapse into one note

This one is counter-intuitive and it is the strongest reason a sung line comes back shorter than it was sung. We sang four vowels on C4, E4, G4 and C5 — a C major arpeggio — and monophonic mode returned exactly one note, C4. It did so whether the vowels were contiguous, whether each was followed by a 120 ms fricative, and whether each was followed by a 150 ms gap. The consonants and the gaps changed nothing.

The cause is in the scoring. E4, G4 and C5 are the 5th, 3rd and 2nd harmonics of C4, so a frame containing only E4 still scores C4 highly, because C4’s harmonic comb covers that frequency. The common fundamental keeps winning. Change the pitches to ones that are not harmonics of each other — C4, F#4, B4, D#5 — and the same test returns three notes instead of one. The collapse is a property of the pitch set, not of the singing.

Practical reading: melodies built on wide, non-harmonic intervals transcribe far better than melodies that outline a chord. An arpeggiated vocal hook is close to the worst case for monophonic mode.

6. A vowel can vanish without being quiet

The harmonicity gate is not about level. A frame must score above 0.35 − 0.25 × sensitivity, so at the default sensitivity of 60 the threshold is 0.200. We measured what a clean synthesised vowel actually scores:

Peak harmonicity score of a synthesised vowel-like tone (fundamental plus 12 harmonics), against a gate of 0.200 at sensitivity 60.
PitchPeak scoreClears 0.200?First sensitivity that recovers it
C40.204Yes, barely60
F40.172No80
F#40.188No70
G40.178No70
B40.251Yes60

Three of those five vowels produce no note at all at the default setting, and they are not the quiet ones or the badly sung ones — they are simply the ones whose harmonic comb happens to score just under the line. Raising sensitivity to 70 recovers F#4 and G4; F4 needs 80. That is the single most useful troubleshooting step for a vocal that comes back with holes in it, and it is why the fix is a slider rather than a re-record.

One caveat, stated plainly: these scores come from synthesised vowel-like tones whose harmonic balance we control exactly, not from recordings of singers. A real voice has breath noise, moving formants and a different harmonic rolloff, so its score moves around more. What the numbers pin down is the mechanism — a fixed gate against a score that sits near it — and the reason the same phrase can lose one note and keep its neighbours.

7. Two voices at once produce nothing in monophonic mode

If you sing a harmony with yourself, or a second voice is present in the recording, monophonic mode does not pick the louder one and carry on. It returns zero notes. Two fundamentals in the same frame break the harmonic-comb assumption badly enough that the frame fails the gate entirely. Polyphonic mode on the same audio returns the two pitches as separate notes — G4 and C5 in our test — which is the correct answer, and the reason poly mode exists.

That gives a clean rule: one voice, monophonic; two or more voices, polyphonic and expect to clean up. The middle case — one voice with reverb, or one voice over a quiet instrument — is where people get caught, because it looks like one voice but behaves like two. Monophonic vs polyphonic works through that decision in more detail.

8. What actually helps

Two related failures are covered on their own pages: a note that comes back exactly an octave high is a harmonic-sum artefact, explained in why a sung note comes back an octave up, and the loudness-to-velocity mapping is in what a single-line converter can and cannot follow. If there are no words at all — just a hummed melody — humming to MIDI is the closer match.

Questions people actually ask

Can this converter write the lyrics into the MIDI?

No, and not because it does them badly — it never writes text at all. A two-note export is 71 bytes containing only tempo, time signature and end-of-track meta events. There is no lyric event and no text event in the file, so there is nowhere for a word to be stored. Add lyrics on a text or lyric track in your DAW after importing.

Why did my consonants disappear?

Because they are noise, not pitch. In monophonic mode a fricative scores below the harmonicity gate and the frame is marked empty, so an “s” contributes nothing. That is the correct behaviour for a pitch tracker: it has no way to represent a sound that has no fundamental.

Why did polyphonic mode give me a dozen notes on one word?

Noise has peaks everywhere. Polyphonic mode keeps up to six spectral peaks per frame and does not require a harmonic series, so a 200 ms sibilant produced 14 notes in our test, scattered from D4 to B7, and a 300 ms one produced 18. The pitches differ between runs because they come from noise. Delete them above your vocal range.

Why did four syllables come back as one note?

If the four vowels sat on a harmonic series — C4, E4, G4, C5, for instance — the harmonic-sum score keeps favouring the common root, C4, because the upper pitches are its own harmonics. We measured exactly that: one note from four syllables, with or without consonants and gaps between them. Use pitches that are not harmonics of each other and the same test returns separate notes.

Why is one note in my line missing while its neighbours are fine?

Most likely the harmonicity gate, not the pitch detection. At sensitivity 60 the gate is 0.200, and a clean vowel scores somewhere between 0.17 and 0.25 depending on the pitch. Our F4, F#4 and G4 tests all fell under the line and produced nothing; raising sensitivity to 70 recovered two of them and 80 recovered the third.

Does singing more clearly help?

Less than you would expect. Clarity helps the harmonic series stand out, which does raise the score, but the gate is a fixed threshold on a score that is already close to it. A cleaner take helps at the margin; a sensitivity change is the bigger lever, and singing the vowels longer is bigger still.

Can I get one note per syllable reliably?

Only by singing slowly and choosing intervals that are not harmonically related. A syllable needs about 0.12 s of vowel, which caps the rate at roughly four syllables a second once consonants are counted, and an arpeggiated melody will collapse regardless of tempo. For anything faster, treat the conversion as a sketch and finish the line by hand.

Convert a vocal take now — it runs in your browser, nothing is uploaded, and every threshold above is yours to reproduce on your own file.

Related guides