Convert WAV to MIDI: Can Your Browser Decode That WAV?
If WAV-to-MIDI conversion stops with a decoding error, check the audio encoding inside the WAV before changing note sensitivity. A .wav filename does not guarantee that this browser can decode its contents. In our actual local-browser test, 16-bit PCM, 24-bit PCM and 32-bit float copies each produced four notes and a 71-byte MIDI download. A Microsoft ADPCM WAV containing the same source phrase failed with “Unable to decode audio data” before note detection.
For a file that decodes successfully, use the existing converter, inspect the notes, then save the MIDI draft. This page isolates the earlier compatibility check: an unsupported encoding is a different problem from a decoded recording with no stable melody notes.
WAV is not one sample encoding
The container holds format information as well as audio data. Microsoft's WAVEFORMATEX reference separates the format tag from the channel count, sample frequency, block alignment and bits per sample. It describes integer PCM, IEEE float and non-PCM formats including ADPCM. Some files use an extensible format declaration with a subtype.
That distinction matters in a browser converter. Our page first asks the browser to decode the selected file, then passes decoded samples to the note detector. MDN's decodeAudioData documentation describes complete audio-file data becoming an AudioBuffer, with an error path if decoding fails. The browser may resample the decoded data to its AudioContext rate. A codec list or a file-picker label is not a measurement of your file's successful conversion.
Four WAVs from the same original phrase
On October 29, 2026, this Windows machine generated a 3.2-second mono source at 48,000 samples per second. It contains four separate sine-wave notes, MIDI pitches 57, 60, 64 and 67. They start at 0.0, 0.8, 1.6 and 2.4 seconds and last 0.5 seconds each, with short amplitude ramps at their edges.
We saved that source as signed 16-bit PCM. FFmpeg then made three derived copies: 24-bit integer PCM, 32-bit floating-point audio and Microsoft ADPCM. These are encoding comparisons, not four performances or a test of additional recording detail. Rewriting a 16-bit source into a larger sample container does not create a better original recording.
We selected each file separately in an unchanged local browser copy of this site's converter, kept Balanced sensitivity, clicked Convert and saved each available MIDI download. We also decoded each file independently with FFmpeg and ran the unchanged production detector and exporter on those samples.
| WAV | File bytes | Measured format declaration | Actual browser result | Separate FFmpeg path |
|---|---|---|---|---|
| 16-bit PCM | 307,244 | Tag 1; 16 bits | 4 events; 71-byte download | 4 events; 71-byte export |
| 24-bit PCM | 460,902 | Tag 65534; subtype 1; 24 bits | 4 events; 71-byte download | 4 events; 71-byte export |
| 32-bit float | 614,514 | Tag 65534; subtype 3; 32 bits | 4 events; 71-byte download | 4 events; 71-byte export |
| Microsoft ADPCM | 77,948 | Tag 2; declared 4 bits | Decoding error; no MIDI download | 4 events; 71-byte export |
An independent RIFF parser walked the chunks to read these fields; it did not assume that every WAV has a 44-byte header. The three actual browser MIDI downloads have the same SHA-256 as the local reference exports. Every export contains four note-ons and four note-offs. This is one bounded result, not a claim that every WAV or every browser behaves this way.
The failure happened before the notes were measured
Decode succeeds → detector runs → four events → saved MIDI.
Decode fails → detector is not reached → no MIDI result.
The ADPCM file was smaller, yet it failed in the tested browser. Increasing detection sensitivity could not repair that failure because no decoded samples reached detection. In the separate FFmpeg path, the same encoded file decoded and yielded the four expected pitches. That is evidence of a browser-path compatibility difference, not evidence that the recording contains no notes or that the file is universally unreadable.
ADPCM's decoded length was 3.223667 seconds in the independent path, compared with 3.2 seconds for the PCM and float versions. Block padding can make an encoded copy's decoded length differ from the source; we report that measured difference rather than assuming identical sample counts.
What to try with your own WAV
- Keep the original. Note the exact message and whether the page ever reaches note detection. A decoding error and “no stable notes” point to different stages.
- Inspect the export format. In your recorder or editor, look beyond .wav for PCM, float or a compressed encoding. Check channels and sample rate too, but do not guess new header values.
- If decoding fails, export a compatible copy. Try an ordinary integer PCM WAV from an editor that can actually open the source, preserving the intended pitch and duration. Our 16-bit PCM fixture worked here; that is not a promise for a damaged file or every browser. Renaming the extension alone does not re-encode audio.
- Retry that copy before adjusting detection. Once decoding works, listen to your source and inspect the draft for missing notes, wrong octaves and timing errors. No amount of codec compatibility establishes musical accuracy.
If decoding succeeds but a very short clip produces no notes, use the existing analysis-window test. If the whole phrase shifts in speed and pitch, check the separate sample-rate-label experiment. If stereo channels cancel, inspect the mono-sum comparison. Those are separate questions, not reasons to call every WAV failure an unsupported codec.
Repeat the measurements
Download the four inputs: 16-bit PCM, 24-bit PCM, 32-bit float and ADPCM. Compare the actual browser downloads for PCM16, PCM24 and float32. There is no browser ADPCM MIDI file because that conversion failed.
The local detector results, independent chunk and event measurements and CSV retain exact fields, counts and hashes. experiment.mjs regenerates the source and four local reference exports using Node.js, FFmpeg and this site's unchanged script.js; set FFMPEG_BIN and SITE_SCRIPT to your local copies. inspect.py independently checks the downloaded inputs and exports when saved together. Local reference MIDI files are provided for PCM16, PCM24, float32 and ADPCM.
We did not measure a general success rate, song transcription, audible quality, processing latency, a DAW import or other providers' converters. The UI results apply to the tested in-app browser on this Windows machine. The reproducible takeaway is to verify decoding separately from note detection, then judge the resulting MIDI against the source.