Audio → MIDI

Audio to MIDI Converter

Guitar to MIDI: what a bend does to your notes

A bend does not come out as one bent note. It comes out as a stack of separate notes, one for every semitone the string passes through: bend a B3 up a whole tone on this converter and the MIDI file contains three notes — B3, then C4, then C#4. Vibrato is worse behaved. Past ±16 cents it starts chopping a single held note into pieces, and past ±58 cents the note disappears from the file altogether. Every number below was measured by running this site's own analyser (dsp.js) on synthesised guitar tones whose correct answer we knew in advance.

None of this is a bug you can argue with, and none of it is specific to our tool. A Standard MIDI file stores a note as a key number plus a start and an end. What follows is the exact arithmetic behind that, measured rather than described, plus the two controls that actually change the outcome.

Why a moving pitch gets chopped

Three facts from the source, in the order they happen:

Put those together and a pitch that slides is cut at every semitone boundary it crosses, with a time resolution of 11.6 ms. Then the writer has no way to put the pieces back together, because the file format it writes has no bend in it:

note on  -> 0x90 key velocity
note off -> 0x80 key velocity        // that is the entire vocabulary of the note track

We checked the exported file rather than trusting the reading. The three-note result of one bent string is an 81-byte file whose note track contains only note-on and note-off events. There is no pitch-bend event in it, and the single 0xE0 byte you can find in the hex dump belongs to the header field that says 480 ticks per quarter note (0x01E0), not to a bend message.

index,midi_note,note_name,start_sec,end_sec,duration_sec,velocity
1,59,B3,0.1858,0.7198,0.5341,117
2,60,C4,0.7314,0.8824,0.1509,115
3,61,C#4,0.8824,1.3351,0.4528,113

That is one note played on one string: held half a second, bent up a whole tone over 300 ms, held again. It is three rows in the CSV and three note pairs in the MIDI file.

Measured: how far you bend against how many notes you get

One plucked note at B3 (246.94 Hz), held 0.50 s, bent over 300 ms, held 0.40 s. Monophonic mode, sensitivity 60, shortest note 60 ms. Only the size of the bend changes.
Bend (semitones)Notes outWhat came out
0.251B3
0.501B3
0.752B3 → C4
1.002B3 → C4
1.502B3 → C4
2.003B3 → C4 → C#4
3.004B3 → C4 → C#4 → D4
4.005B3 → C4 → C#4 → D4 → D#4
5.003B3 → C4 → E4

Up to four semitones the rule is clean: the number of notes is the number of semitones you crossed, plus one. Stay under half a semitone and nothing splits, because the rounding never tips over.

The last row is the interesting failure. At five semitones in 300 ms, each semitone band lasts only about 60 ms, and the default shortest-note setting of 60 ms starts deleting the middle pieces. The bend did not come out as six notes; it came out as three, with two of them missing. That is the 60 ms floor, not a different rule.

A pitch curve rising by two semitones across a horizontal semitone grid, cut into three numbered blocks labelled B3, C4 and C#4, with a second panel showing a vibrato curve crossing the same grid.
A rising pitch crossing a grid of semitones. Every line it crosses is a new note in the file.

Measured: bend speed decides the size of the pieces, not their number

The same whole-tone bend, B3 to C#4, with only the bend time changed. Lengths are the notes the converter wrote.
Bend time (ms)Bend rate (sem/s)NotesPieces
5040.02B3 476 ms  |  C#4 360 ms
8025.02B3 476 ms  |  C#4 372 ms
10020.02B3 488 ms  |  C#4 372 ms
15013.33B3 499 ms  |  C4 81 ms  |  C#4 406 ms
20010.03B3 511 ms  |  C4 104 ms  |  C#4 418 ms
3006.73B3 534 ms  |  C4 151 ms  |  C#4 453 ms
4005.03B3 569 ms  |  C4 209 ms  |  C#4 464 ms
6003.33B3 627 ms  |  C4 302 ms  |  C#4 522 ms
9002.23B3 697 ms  |  C4 453 ms  |  C#4 592 ms

Two things fall out of this. First, speed does not change the count, it changes the lengths. Bend slower than about 100 ms and the middle note becomes long enough to survive the 60 ms floor; bend faster and it is too short to be written at all, which is why the fast rows show two notes instead of three.

Second, the middle piece is reliably about half the bend time — 81 ms of a 150 ms bend, 151 ms of 300 ms, 302 ms of 600 ms, 453 ms of 900 ms. That is exactly what you would predict from rounding: out of a two-semitone bend, the pitch spends one semitone inside the C4 band and one semitone inside the bands on either side.

We repeated the same 300 ms bend on four different strings. Low E at fret 3, A at fret 5 and G at fret 7 all produced three pieces, with the middle one at 151, 151 and 128 ms. The high E at fret 12 produced two, with the middle piece dropped — the same 60 ms floor acting on a slightly shorter middle band.

Slides: fast gives you two notes, slow gives you the whole fretboard

A slide up the low E string from fret 5 (A2, 110 Hz) to fret 12 (E3, 164.81 Hz) — seven semitones. Held 0.30 s at each end.
Slide time (ms)Rate (sem/s)NotesWhat came out (lengths in ms)
10070.02A2 267  |  E3 279
15046.72A2 279  |  E3 279
20035.02A2 279  |  E3 279
30023.32A2 290  |  E3 302
45015.68A2 302  |  A#2 58, B2 58, C3 58, C#3 58, D3 70, D#3 70  |  E3 302
60011.78A2 313  |  six pieces of 81–93  |  E3 313
9007.88A2 337  |  six pieces of 128–139  |  E3 337
14005.08A2 372  |  six pieces of 186–209  |  E3 383

The same 60 ms floor governs everything here. Slide in under about 300 ms and every intermediate semitone is too short to be written, so you get a clean two-note result: where you started and where you landed. That is usually what you wanted. Slide slowly and you get the full chromatic run — eight notes for seven semitones — which is rarely what you wanted but is at least honest about what happened.

Vibrato: where a note stops splitting and starts disappearing

Vibrato is the case where the failure stops being cosmetic. Each frame also gets a harmonic-comb score, sal — how well the spectrum lines up on a harmonic series. A pitch that is moving inside the 92.88 ms window smears its own harmonics, and the score falls. The threshold it has to clear is set by the sensitivity slider:

salThr = 0.35 - 0.25 * (sensitivity / 100)     // 0.20 at the default sensitivity of 60
A4 (440 Hz) held 1.2 s with vibrato at 5.5 Hz, sensitivity 60. The score column is the lowest harmonic-comb score measured anywhere inside the note.
Vibrato depthNotes outLowest scoreResult
±5 cents10.274one clean note, 1149 ms
±1010.244one clean note
±1510.216one clean note
±161—still one note
±183—splitting starts here
±2070.193pieces of 104–174 ms
±3090.174pieces of 93–104 ms
±4060.165pieces of 128–139 ms
±5060.150pieces of 128–139 ms
±6000.136the note is gone
±7000.124gone
±8000.116gone

The cause is visible in the score column: it falls in step with the depth — 0.274 at ±5 cents down to 0.136 at ±60 — and it crosses the 0.20 threshold somewhere between ±50 and ±60. Below the threshold, no frame in the note qualifies, so no note is written at all. Not a quiet note, not a short note: nothing. If a sustained note with heavy vibrato is missing from your MIDI while the rest of the take converted fine, that is the mechanism.

Raising sensitivity does bring it back, but not usefully. At sensitivity 70 the lost ±60-cent note returns as four pieces of 58 ms; at 80 and above, as eight pieces of 58 ms. You have traded a missing note for a shredded one.

The two controls that actually help

Shortest note length is the one that works. Because the middle piece of a bend is about half the bend time, setting the shortest note just above that deletes the middle and leaves you with the two notes you meant to play. Measured, on the whole-tone bend:

The smallest shortest-note setting that removes the middle piece, against the length that piece actually was.
Bend time (ms)Middle piece (ms)Setting that removes it
1508190 ms
200104120 ms
300151160 ms
400209220 ms
600302310 ms
900453460 ms

Read it as a rule of thumb: set the shortest note to a bit more than half the time you take to bend. A 200 ms bend wants 120 ms. The cost is real — genuine short notes under that length are deleted too — so check the piano roll after you change it.

Sensitivity is the one that does not. We swept it on the same 200 ms bend: at 0 and 10 the whole note disappeared; at 20 and 30 it came back as a single B3 of 453–464 ms, meaning the note you bent to was gone; from 40 upward it was the usual three pieces. Turning sensitivity down does not merge a bend, it deletes the landing note. Quantising does not merge it either — it moves the three pieces onto the beat grid and leaves three pieces.

The rest of the guitar fits comfortably

None of the above is a range problem. The pitch search runs from 55 Hz to 1800 Hz, and every note a guitar produces sits inside that, including the extremes:

Single notes at 0.55 amplitude, analysed with the default settings. The bin column is how many FFT bins one semitone spans at that pitch — below 1, the detector is interpolating between bins rather than reading a peak.
NoteTrue (Hz)Read (Hz)MIDI outSemitone in bins
E2, low string open82.4182.3740 — E20.455
A2110.00109.9945 — A20.608
D3146.83146.8050 — D30.811
G3196.00195.9955 — G31.082
B3246.94247.0759 — B31.364
E4, high string open329.63329.6064 — E41.821
E6, 24th fret1318.511318.5188 — E67.282
D2, drop D73.4273.4238 — D20.405
B1, 7-string low B61.7461.6935 — B10.341

Every one was identified correctly, and the pitch readings are within a few hundredths of a semitone. Note the low end: at the open low E a whole semitone is less than half an FFT bin wide, so the detector is interpolating rather than reading a clean peak. That is where bends and intonation drift hurt most, and it is another reason the low strings are the ones that come out chopped.

In one minute: what a bend actually looks like

Left: a pitch rising across the semitone grid and being cut into three coloured blocks. Right: vibrato that fades to nothing — the note that vanishes.

The animation is a one-minute summary of the mechanism above: a rising pitch crossing semitone lines, and a vibrato that loses its note when the score threshold is crossed.

How to check your own take in four steps

  1. Convert the file and export the note list as CSV. The columns are index, midi_note, note_name, start_sec, end_sec, duration_sec, velocity.
  2. Sort by start_sec and look for runs of consecutive notes that are one semitone apart with no gap between them — one ending exactly where the next begins. That pattern is a bend or a slide, not a phrase.
  3. Count them. If a solo you played as 40 notes comes out as 70, the difference is almost all bends and vibrato, and the shortest-note setting is the fastest way to collapse them.
  4. If a held note is missing entirely, look at the depth of its vibrato before you blame the threshold. Deep vibrato is the one failure here that removes a note rather than splitting it.

One honest limitation: everything above was measured on synthesised plucked-string tones — ten harmonics, exponential decay, known pitch tracks — not on a miked cabinet. Real amplifiers add compression and noise that will move these numbers, and we have not measured that. What will not change is the mechanism: rounding to a key number per frame, a new note at every semitone boundary, and a 60 ms floor underneath it all.

Questions people actually ask

Can a MIDI file store a bend at all?

Yes, in general — the format has pitch-bend messages, and that is how a real bend is normally represented. This converter does not write them. Its writer emits only note-on and note-off events, which we confirmed by reading the exported bytes rather than the code that produced them: the 81-byte file for one bent note contains no bend message. So the only shape a bend can take here is a staircase of separate semitones, and the only question is how many steps. For a converter that does preserve bends as real pitch-bend events — and what that changes in your score — see what pitch bend detection adds to audio to MIDI.

Why does my solo come out with far more notes than I played?

Nearly always bends, slides and vibrato. One whole-tone bend becomes three notes; a slow seven-semitone slide becomes eight; moderate vibrato chops a single held note into six to nine pieces, each around 100–140 ms. Raise the shortest-note setting to just above half your typical bend time and the staircase collapses back toward what you played.

Why did one sustained note vanish from the MIDI entirely?

If it had wide vibrato, that is the most likely cause. The harmonic-comb score has to clear 0.20 at the default sensitivity, and we measured it falling to 0.136 at ±60 cents of vibrato depth, at which point no frame in the note qualifies and nothing is written. Raising sensitivity brings the note back as a row of 58 ms fragments rather than as one note, so the practical fix is to convert a cleaner take or a take with less vibrato.

Can I pull the lead guitar out of a track with several guitar layers on it?

This is a question people ask out loud on production forums, usually in frustration, and the honest answer is that this tool does not separate instruments. Polyphonic mode looks for up to six pitches in each frame, but it has no idea which string or which player any of them belongs to, and two guitars playing in octaves will be treated as one pitch plus its harmonic. The full measurement of what polyphonic mode returns is in how many notes a converter can hold at once.

Related guides

Every number on this page can be reproduced on your own machine: convert a file, export the CSV, and read the note column against the tables above.