This project has moved and is read-only. For the latest updates, please go here.

Is NAudio feasible for live SoundFont playback?

Jul 11, 2013 at 8:58 AM
I want to use NAudio to playback multiple SoundFont tracks in parallel (basically an 8-Track MIDI File) and I wonder if it is feasible for that task or if SoundFonts are more intended as a "Save to WAV as a build process" thing?

This is mainly intended for Desktop-Mode Windows Vista/7/8, but if it were working in Windows-8-Store apps as well, that would be icing.
Jul 11, 2013 at 8:15 PM
Certainly this is feasible in realtime. You'll have to write the wavetable synthesis logic, but most of the rest of the plumbing is available in NAudio already. I would suggest implementing WaveProvider32 and having 8 instances of a custom ISampleProvider inside it to render each "track" or "channel" of audio. You'll also need to mix the channels inside the WaveProvider32.

You should probably seriously consider whether you need a "MIDI-like" implementation or just a simple mixing audio file player (which could support WAV, MP1 / MP2 / MP3, or Vorbis with minimal code on your part).