11

I've been searching for about a day and haven't found anything that can point me in the right direction for this - either information is lacking, I'm bad at the internet, or it's hard to find information on music programming for a programming language whose name is that of a music note.

Anyways:
I want to take data that I've cooked (from camera, kinect, joystick control, etc.) and use it to send MIDI data to other programs, such as Propellerhead Reason or other DAWs on my machine. Gathering the input and cooking the data is not the issue, but sending the MIDI messages is. I've downloaded the C# MIDI Toolkit from codeproject and am at a loss for where to start. Could somebody point me in the direction of an simulated NoteOn message to be interpreted by a DAW, or other basic example of sending MIDI data?

I can find examples of accessing the Microsoft MIDI Synthesizer, interpreting messages from keyboards and routing them, and a number of other examples, but I feel like this is pretty basic and I'm not sure why I can't find any information on it.

Thanks!

Michael
  • 318
  • 3
  • 14

2 Answers2

7

As suggested by MusiGenesis, I recommend creating a virtual MIDI port. However, there is a way to you can embed this directly into your software, and even name it appropriately.

http://www.tobias-erichsen.de/virtualMIDI.html

Tobias' driver allows you to do this, and if you shoot him an e-mail, he will send you the API, which I've found very easy to integrate with .NET.

From there, the C# MIDI Toolkit is all you need. I also recommend checking into NAudio.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • +1. I have used this exact setup (virtual MIDI port + the MIDI toolkit), and have been able to send MIDI messages using C# – sonofrage Nov 11 '18 at 06:51
  • 1
    Would be nice to have an example using either naudio or C# midi toolkit. I can't figure out how to make both of them work together – mhlsf Oct 28 '19 at 23:55
1

This answer seems to suggest that it's possible to configure a virtual MIDI port that your Codeproject MIDI example could write messages to, and that in Reason could be selected as the input source (I haven't tried it myself so I can't say if that would work or not).

Other than that, the normal way of controlling Reason remotely would be to author a VST plugin (degree of difficulty: pretty high).

Community
  • 1
  • 1
MusiGenesis
  • 74,184
  • 40
  • 190
  • 334
  • Yeah, I'm trying to avoid writing a VST. Since Reason doesn't have any support for them I wasn't aware that even looking into it would help. I know that this sort of thing is very easy to do in Max/MSP, but unfortuatenly Max/MSP is very expensive. You have sent me on the correct path though, I believe it's about to start working. Thank you! – Michael Nov 02 '11 at 03:48
  • I second MusiGenesis' suggestion of using a virtual MIDI port. It's a standard way to send MIDI data between applications running on the same computer. – Shannon Matthews Nov 02 '11 at 11:32
  • @TheJew72: please post a comment here if you get the virtual port thing working. I'm curious to know about that myself. – MusiGenesis Nov 02 '11 at 13:00
  • 3
    I used a virtual port program called "LoopBe" that worked perfectly. I think it only supports one port or something, but that's all I needed. I've now got my Kinect controlling Propellerhead Reason, which is pretty much way cool. Thanks ya'll – Michael Nov 16 '11 at 19:13