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

using NAudio as midi controller (for FL Studio)

Apr 29, 2011 at 3:44 AM

Hi - can NAudio be used to control music software such as FL Studio as a MIDI controller? Synthesizers in FL Studio can have their parameters controlled by a MIDI controller - e.g. when I hook up my MIDI keyboard controller I can use the knobs on it to control the synthesizer settings in FL Studio. How can a .NET app be recognized as a MIDI controller? I've developed a simple WPF application that uses MidiOut but it doesn't work...  I'm sure I'm missing something. Here is what I've got so far:

// only one device on my system, can I assume zero?
midiOut = new MidiOut(0); 

// this code called whenever I change the value of a slider control...
var message = MidiMessage.ChangeControl((int)MidiController.Modulation, myModulation, channelNumber);
this.midiOut.Send(message.RawData);

Any thoughts?

Apr 29, 2011 at 9:27 AM

that should work, but MidiOut(0) will not send messages to your MIDI input device, so FL Studio will not receive it. You might need to use a MIDI loopback like MIDI Yoke to connect the output of your WPF app to FL Studio. Alternally if you have a USB midi interface, connect the MIDI out to the MIDI in with a cable.

Apr 29, 2011 at 3:27 PM

Sounds like Midi Yoke is what I'm looking for. I already have the USB midi interface working :) I'm only interested in writing my own controller. Thanks!

-Mike