Browser-based music tool · MIDI → WAV or MP3

MIDI to WAV

Render a Standard MIDI File to audio. Without a SoundFont each General MIDI instrument family gets a synthesised voice and channel 10 gets synthesised drums; with an .sf2 SoundFont the notes play its samples with their own envelopes. Mute tracks or set their volume before rendering.

MIDI file

A Standard MIDI File up to 8 MB, format 0 or 1, with beats as the time unit.

Drop a MIDI file here or click to choose

.mid, .midi

Sound

Drop a SoundFont (.sf2) here, or leave empty for the built-in voices

.sf2 SoundFont 2, up to 256 MB (optional)

With no SoundFont, the 16 General MIDI families are approximated by additive waveforms and drums are synthesised, so a grand piano and an electric piano sound alike.

Sample rate

Render and export

File type

16-bit PCM at the working sample rate.

Notes are rendered in 12-second windows by an OfflineAudioContext, so a long song takes a while but the page stays responsive and you can cancel.

MIDI to WAV

Operator: Abdulla Al Fahad. How tools are built and checked

A MIDI file contains no sound, only instructions: which note, how hard, on which channel, with which instrument number. A song of 2,400 notes weighs a few dozen kilobytes, and what you hear depends on the synthesiser that plays it. This page renders them to an audio file, with built-in voices or with the samples of a SoundFont you provide, so the result can go into a video, a game or an email.

Key features

  • Per-track mute and volume from 0 to 200%, with each track's instruments and note count shown
  • A built-in voice for each of the 16 General MIDI families, and synthesised drums for channel 10
  • SoundFont 2 files: presets by bank and program, key and velocity ranges, tuning, loops, the full volume envelope from delay to release, attenuation and pan
  • Program changes, bank select, channel volume, expression, pan and the sustain pedal followed as the file plays
  • Output as 16-bit WAV or MP3 at 44.1 or 48 kHz, with the loudest peak set to -1 dBFS
  • A note count for notes the SoundFont has no sample for, which are played with the built-in voice

What the built-in voices and the SoundFont reader cover

The MIDI file may be up to 8 MB, format 0 or 1 (format 2 is read as format 1), with the time unit in beats; files that count time in SMPTE frames are refused. Tempo changes are followed. A render covers up to 15 minutes and 40,000 notes after muting, so a dense orchestral file may need its busiest tracks muted.

Controllers read from any track: program change, bank select (the high byte), channel volume (7), pan (10), expression (11) and the sustain pedal (64). A note whose end falls while the pedal is down rings on until the pedal comes up. Pitch bend, modulation, reverb and chorus sends, and registered parameters are read past and not applied.

A SoundFont must be SoundFont 2 with 16-bit samples, up to 256 MB; SoundFont 3 and DLS files are refused. The reader uses sample zones, key and velocity ranges, root key, coarse and fine tuning, scale tuning, the volume envelope (delay, attack, hold, decay, sustain and release), initial attenuation, pan and looping, including the mode that loops while the key is down and then plays on to the end of the sample. At most 16 samples sound for one note, and a file whose zone tables are malformed or oversized is refused. Filters, LFOs, modulators and 24-bit sample data are ignored.

How it works

Each note is turned from ticks to seconds through the tempo map, given the program, bank, volume, expression and pan in force at its start, and a gain of volume squared times expression squared times the track's volume. Channel volume 100, the default, gives a gain of 0.62, and 127 gives 1.00.

Notes are grouped by the 12-second window in which they start. Each window is rendered by its own OfflineAudioContext, long enough for its notes to finish ringing (1.6 seconds past the last built-in note, 4 seconds past the last SoundFont note), and added into the output at its offset. That keeps memory bounded, lets the page report progress, and lets you cancel between windows.

A built-in voice is an additive waveform, a handful of harmonics with an attack, decay, sustain and release and a low-pass filter that follows the pitch. The piano family has seven partials, a 4 ms attack, a decay of about 1.4 seconds to 12% and a 0.35 second release; organs hold level; strings swell over 0.14 seconds. Drums are synthesised by key: a kick is a falling sine, a snare a tone plus filtered noise, hats are high-passed noise of 45 or 300 ms.

With a SoundFont, the preset is found by bank and program (channel 10 uses bank 128, and its program change chooses the drum kit), its zones are matched to the note's key and velocity, and each sample is played at the pitch the key and its root key give, with the zone's own envelope, loop points and pan. A note with no matching zone is counted and played with the built-in voice.

When the mix is done its peak is found, and if the option is on, or the peak is above full scale, everything is scaled so the peak sits at -1 dBFS. The page reports the original peak and the change.

Common use cases

  • A 3-minute song is rendered in about 15 windows of 12 seconds; you see progress after each and can cancel between them.
  • A choir director transposes a four-part hymn in the MIDI Editor on this site, then mutes the soprano track here and sets the bass to 150% for rehearsal.
  • A game developer renders a 30-second loop with a 120 MB General MIDI SoundFont, then checks that the render ends with its reverb tail gone.
  • A 52,000-note orchestral file is over the 40,000-note limit; muting the two busiest string tracks brings it to 31,000 and it renders.
  • A teacher turns a MIDI arrangement into an MP3 at 128 kbps, about 2.9 MB for a 3-minute song, to put in a slide deck.

How to use this tool

  1. Drop the MIDI file; each track appears with its instruments.
  2. Mute tracks you do not want and set the volume of the others.
  3. Optionally drop a .sf2 SoundFont to use instead of the built-in voices.
  4. Press Render the audio, then download the WAV or MP3.

Example

A piano piece exported from a sequencer at 120 BPM, 480 ticks per beat, rendered with a SoundFont piano whose sample was recorded at middle C

The melody plays middle C (note 60) for the first half second, with the sustain pedal pressed at tick 400 and lifted at tick 1200 and the channel volume at 100
The left hand adds C3 (note 48) and the right hand a high C5 (note 72), neither under the pedal

What the render does

The pedal goes down at 0.417 s, before the note ends, so the note rings until the pedal comes up at 1.25 s
Channel volume 100 gives a gain of 0.62
Note 60 plays the sample as recorded; note 48 plays it 12 semitones down, at half speed; note 72 plays it an octave up, at double speed

Edge cases to watch

Pitch bend is not applied, so a guitar bend or a slide in the file plays as a plain note. Files that rely on bends will sound stiffer than in a full player.

The built-in voices share one waveform per family, so the Acoustic Grand and the Electric Piano sound alike, and the drums have one voice per drum type. Use a SoundFont when the instrument matters.

A SoundFont's filters, reverb and chorus are ignored, so a font that leans on them sounds drier and brighter here than in a player that implements them.

A large SoundFont is read into memory whole, up to 256 MB, and each sample is converted only when a note needs it. Close other heavy tabs for the biggest fonts.

Normalising scales each render to its own peak, so stems rendered one track at a time no longer keep their relative levels. Switch the option off for stems, as long as the mix stays under full scale.

  • Press render with only one track unmuted to hear what a part is doing before you balance the others.
  • When the report lists notes without samples, try a different SoundFont or accept the built-in voice for them; the listed count is exactly the notes that fell back.

Common errors and how to fix them

This file counts time in SMPTE frames instead of beats
Re-save the MIDI file with a ticks-per-beat resolution in a sequencer; the beat-based tempo map is what this page follows.
This is not a SoundFont 2 file
Choose an .sf2 file. SoundFont 3 (.sf3) and DLS files are not supported.
Every track is muted or empty
Tick at least one track that has notes.
The song lasts at least 15 minutes
Notes after that point are left out. Cut the MIDI file in a sequencer to render the rest.

Best practices

  • Render a short test with the SoundFont first by muting all but one track, since a bank mismatch shows up at once in the fallback count.
  • Keep the sample rate at 44.1 kHz for MP3 unless the project needs 48 kHz; both are supported.

What a General MIDI file leaves to the player

General MIDI fixes the instrument names behind the numbers, so program 0 is a grand piano on any compliant player, but not how a grand piano sounds. Two players read the same bytes and produce different music. That is why this page asks for a SoundFont when you want a specific sound, and why its built-in voices are described as an approximation by family.

Why a long song is rendered in windows

A browser's offline audio context holds the whole result in memory and cannot be stopped once it starts. Rendering a 15-minute song in one piece would mean a long freeze with no progress and no cancel. Windows of 12 seconds keep each context small, and the sound of a note that starts in one window and rings into the next is rendered in full by the window it started in.

Frequently asked questions

Why does the drum track sound the same whatever General MIDI file I use?

The built-in drums are synthesised from the key number alone: a kick, snare, clap, hats, toms, crash, ride and cowbell. Load a SoundFont with a drum kit in bank 128 to use sampled drums.

Do I need a SoundFont?

No. Without one, each of the 16 General MIDI families has a synthesised voice, which is enough to hear a melody and check an arrangement. A SoundFont is for when the sound itself matters.

Can it open .sf3 or DLS files?

No. SoundFont 3 uses compressed samples and DLS is a different structure; the page reads only SoundFont 2 with 16-bit samples.