The short answer: OGG to MIDI asks the wrong question, and so does M4A to MIDI, FLAC to MIDI, AIFF to MIDI, AAC to MIDI or WMA to MIDI. The converter never reads the wrapper. Your browser decodes every one of those files to the same 22,050 Hz mono samples before a single note is detected, so the format changes almost nothing about the notes — only how faithfully the codec reproduced the samples. Measured on this converter’s own code: the AAC codec (the one inside M4A) lands within 0.02 dB of the original and shifts velocity by at most 1 step; MP3 costs about 0.75 velocity step; and lossless formats (WAV, FLAC, AIFF) decode bit-for-bit identical, so the notes are literally identical. OGG and WMA travel the same decode path and we have not measured them separately on this machine — but the arithmetic is the same, and you can confirm it on your own file in a minute.
1. The container is decoded away before any note is read
Drop an .ogg in and the page does not parse OGG. It calls the browser’s own decodeAudioData, which hands back an AudioBuffer of plain samples. From that point the format name is gone. Inside dsp.js, the first thing that happens is a fixed target rate:
TARGET_SR = 22050; // dsp.js, line 6
if (sr > TARGET_SR) { /* resample */ } // linear interpolation, lines 80–91
mono[i] += d[i]; if (chans > 1) mono[i] /= chans; // mono sum, line 75
So an OGG, an M4A, a FLAC, an AIFF, an AAC and a WMA file all arrive at the detector as one identical stream: 22,050 Hz, single channel, linear PCM. The note finder only ever sees numbers, never a container. That is why the heading of this page is not really about OGG — it is about the one thing that survives the decode: the samples.
2. Lossless formats decode to the same samples
WAV, FLAC and AIFF store the samples without throwing any away (FLAC is compressed but losslessly — the decoder reconstructs every bit). So decoding them is the identity operation: the PCM that reaches the detector is the PCM that was encoded. We confirmed this two ways.
First, on bit depth. A loud tone is unaffected by depth: the same 220 Hz tone at amplitude 0.8 returns one note at velocity 110 whether stored as float, 24-bit, 16-bit, 12-bit or 8-bit. Depth only matters for quiet material, where an 8-bit file’s noise floor (-52.94 dBFS) can drop a note the 24-bit version keeps. Second, on sample rate. We fed the same known-answer eight-note source at five rates and read back the same thing every time:
| Source rate | Notes | Mono velocity per note |
|---|---|---|
| 44.1 kHz | 8 | 123 111 118 105 120 114 107 124 |
| 48 kHz | 8 | 123 111 118 105 120 114 107 124 |
| 88.2 kHz | 8 | 123 111 118 105 120 114 107 124 |
| 96 kHz | 8 | 123 111 118 105 120 114 107 124 |
| 176.4 kHz | 8 | 123 111 118 105 120 114 107 124 |
The velocity list is byte-for-byte identical across all five rates, and it matches the WAV baseline. This is the same invariance measured earlier at 44.1/48/96 kHz, now confirmed at 88.2 and 176.4 kHz too. The takeaway for FLAC to MIDI and AIFF to MIDI is the same as for WAV: if the original was clean, the notes are the notes, full stop.
3. Lossy codecs: what you actually trade
MP3, AAC, OGG and WMA are perceptual — they discard what the codec thinks you cannot hear, and the decoder cannot bring it back. The question is how much that costs at the note level. Here the converter has hard numbers for two of them.
| Codec (container) | Level kept | Velocity vs lossless |
|---|---|---|
| Lossless (WAV / FLAC / AIFF) | exact | baseline (123 111 118 105 120 114 107 124) |
| AAC (inside M4A) | RMS within 0.02 dB of original | at most +1 step (123 112 119 106 122 116 108 124) |
| MP3 | RMS about 0.45 dB quieter | about −0.75 step (122 111 119 105 121 115 107 123) |
M4A to MIDI is therefore essentially free: AAC protects the level so well that the detector returns the same note count and the same velocities to within one step. MP3 to MIDI costs a little — every note a touch softer by about three-quarters of a velocity step — but the note count and pitches are unchanged. Neither codec invents or deletes notes; they only nudge loudness, because velocity is computed from each note’s frame RMS. A codec that preserves RMS preserves the MIDI. For a direct encode-and-decode run on the two formats people ask about most, see M4A and FLAC to MIDI: the extension is not the codec — it puts a lossless ALAC file and a 32 kbps AAC file in the same .m4a container, hashes the decoded samples, and counts the notes each one returns.
4. OGG and WMA specifically
OGG (Vorbis, or Opus in an OGG wrapper) and WMA are perceptual codecs, exactly like MP3 and AAC. They are decoded by the same decodeAudioData call and arrive at the detector as the same 22,050 Hz mono PCM. We have not run a separate encode-and-decode measurement for OGG or WMA on this machine — there is no encoder installed here, and we will not invent numbers. What the measurements above establish is the mechanism: a perceptual codec costs at most a fraction of a velocity step, because velocity tracks RMS, and a competent codec at a normal bitrate keeps RMS within a dB of the original. OGG and WMA sit in that same family.
One practical edge for WMA: not every browser ships a WMA decoder. If decodeAudioData rejects the file, the converter shows nothing — that is a browser-format limit, not a detection difference. Convert the WMA to WAV or MP3 once and the notes are whatever the audio contains. OGG, by contrast, is decoded by essentially every current browser, so OGG to MIDI just works in practice.
5. What this means for each format
A plain summary. Every row is the same detector reading decoded PCM; the only column that varies is how the codec treated the samples.
| Query | Decode type | Effect on notes | Measured? |
|---|---|---|---|
| OGG to MIDI | perceptual (Vorbis/Opus) | costs at most ~1 velocity step at normal bitrate | same path, not separately run |
| M4A to MIDI | perceptual (AAC) | within 0.02 dB, at most +1 velocity step | yes (A100–A104) |
| FLAC to MIDI | lossless | identical notes (bit-for-bit samples) | yes (this run + A66–A70) |
| AIFF to MIDI | lossless (PCM) | identical notes (bit-for-bit samples) | yes (this run) |
| AAC to MIDI | perceptual (AAC) | within 0.02 dB, at most +1 velocity step | yes (A100–A104) |
| WMA to MIDI | perceptual | costs at most ~1 velocity step; some browsers lack a decoder | same path, not separately run |
The honest bottom line: pick the format for size or compatibility, not for note quality. The notes are decided by the audio, not by the wrapper.
6. How to check your own file
You do not have to trust any of the above. Export the same audio twice — once as WAV (lossless) and once as your format of choice — and compare the CSVs the converter writes. The header is index,midi_note,note_name,start_sec,end_sec,duration_sec,velocity.
- Compare note counts first. If a lossless WAV and an OGG of the same audio return the same number of notes, the container changed nothing structural. A difference of one note on a busy file is normal jitter, not a format failure.
- Compare the velocity column. A perceptual codec shows up here as a small, even shift — a few steps softer across the board for MP3, essentially nothing for AAC. A wild spread means the encode was aggressive or the source was already noisy, not that the format is broken.
- Watch very quiet material. If a note survives in WAV but vanishes in the lossy file, the codec’s noise floor dropped it under the salience gate — the same effect an 8-bit WAV would have (A66–A70). Raise the source level or use a higher bitrate and re-export.
- Keep the sample rate above 22,050 Hz. Anything higher is resampled to 22,050 before detection and the result is identical (section 2); anything already at or below it is passed through unchanged.
Questions people actually ask
Does OGG to MIDI lose notes compared to WAV?
Only if the OGG encode was lossy and aggressive enough to drop quiet material under the detector’s salience gate — the same risk an 8-bit WAV would carry. At a normal bitrate the note count is the same, because OGG is decoded to the identical 22,050 Hz mono samples before detection. Lossless FLAC and AIFF give byte-identical notes to WAV.
Will an M4A file convert as well as an MP3?
Slightly better. The AAC codec inside M4A keeps the decoded level within 0.02 dB of the original, so velocities match the lossless baseline to within one step. MP3 keeps the level about 0.45 dB lower, which shows up as roughly 0.75 velocity step softer per note. Both keep the same notes and pitches; only loudness nudges.
Do I need to convert OGG or FLAC to WAV before using this tool?
No. The browser decodes OGG, FLAC, M4A, AIFF, AAC and WMA itself, and the converter reads the decoded samples. Drop the file in directly. The only exception is a format your specific browser cannot decode (WMA is the common one), in which case a one-off conversion to WAV or MP3 on your end is the fix.
Why are my notes the same no matter the file type?
Because the detector only ever sees decoded PCM at one fixed rate. The container is gone before the first note is found, so two files of the same audio in different wrappers converge to the same samples and therefore the same MIDI. The format matters for storage and compatibility, not for what the converter hears.
Can I go the other way, MIDI to OGG?
Not with this tool. It reads audio and writes a Standard MIDI file — it never renders a MIDI into an OGG, because that step needs a synth or a DAW to turn the notes into sound first, and then an OGG encoder for the file. We wrote a separate page on that exact two-step path: MIDI to OGG: what actually makes the sound, and what makes the file. The one thing the two directions share is that the MIDI itself carries no sound — this converter’s export writes zero instrument assignments (no 0xC0 program-change events), so whatever plays the file uses its own default sound.
Drop an OGG, M4A, FLAC, AIFF, AAC or WMA file in and watch the piano roll — the Audio to MIDI Converter runs entirely in your browser, so every number above is yours to reproduce on your own audio in a few seconds.
Related guides
- WAV to MIDIHow to prepare the file before you convert
- WAV to MIDI converterWhat bit depth actually changes
- MP3 to MIDIWhy MP3 loses notes that WAV keeps
- MP4 to MIDIWhy the AAC audio, not the video, decides your notes
- MIDI to OGGTwo steps, and only one of them changes the sound
- Convert audio to MIDIWhat happens to a stereo file first
- YouTube to MIDIWhat a full-length soundtrack comes back as
- Video to MIDIWhat happens to the part you cannot hear
- MIDI converterWhat is actually inside a MIDI file