Midi to WAV with GraphEdit

Skip to first unread message


Nov 21, 2007, 3:53:22 PM11/21/07
I am thinking about building a utility to convert Midi (*.mid) files into
WAV files.

With GraphEdit I can play a Midi file out through the Midi Renderers and
wondered if there is a Midi Renderer that will produce a WAV file instead.

If it is possible can the graph be run faster that real time to convert the
Midi files.



Chris P.

Nov 21, 2007, 5:06:39 PM11/21/07

To do it right you need a proper MIDI renderer that outputs PCM samples.
The MS MIDI Renderer doesn't do this, it is just a light wrapper over the
old midi API, it calls midiStreamOut for output. This old API makes the
assumption that the MIDI stream is being rendered by hardware, so there is
no PCM to catch. Of course it is possible to play out the MIDI in real
time and recapture it from waveIn but not ideal.

What would be ideal is a way to harness the wavetable synth directly,
wrapped inside a filter that outputs PCM samples. I haven't investigated
to see how feasible this is.

[MS MVP for DirectShow / MediaFoundation]

Alexander Naumov

May 18, 2011, 5:27:23 AM5/18/11

without any doubts, you need custom DirectShow transform filter utilizing MS Software MIDI Synth. Such filter could be implemented using DirectMusic; it would take MIDI messages and pass them to mentioned MIDI Synth input, taking PCM samples from its output. Not so easy task, but not impossible. There are no magic, and all required information is publicly available.

I have implemented such filter. It does works fine; it can convert MIDI to PCM much faster than realtime. Although Microsoft does not support DirectMusic now, my filter works well even in Win7.

In case you are searching for commercial implementation, and able to buy source code - please contact me at vWorker. You may find a link on my homepage.

Reply all
Reply to author
0 new messages