Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send midi signal from c# to ableton

I'm trying to send a midi signal from my c# app to a track in Ableton Live.

I've tried both the Bass.net and midi-dot-net both with the same effect: No events arriving in Ableton. (I've got loopMidi installed and thats where I send my signals to.)

Strangely enough when I target my midi-keyboard it plays the stanard piano sound..

My code is 1-1 copy of the examples on the sites:

OutputDevice outputDevice = OutputDevice.InstalledDevices[0];
outputDevice.Open();
outputDevice.SendNoteOn(Channel.Channel1, Pitch.C4, 80);  // Middle C, velocity 80
outputDevice.SendPitchBend(Channel.Channel1, 7000);  // 8192 is centered, so 7000 is bent down

As I'm still quite to new to midi I think I'm still misunderstanding some basics here.. Can anybody see what I'm doing wrong?

like image 695
AyKarsi Avatar asked Apr 02 '12 21:04

AyKarsi


2 Answers

I would advise using a utility such as MidiOx to see that MIDI signals are actually being sent as you suspect they are.

If that is working as expected, then you probably haven't configured Live's MIDI I/O correctly in the preferences. A nice way to test this is to enter MIDI mapping mode in live, then click on any clip in the session view. Have your program send MIDI data, and if Live can receive that data you will see it map a MIDI event to the clip in question.

like image 171
Nik Reiman Avatar answered Oct 14 '22 01:10

Nik Reiman


Your code is not sending MIDI to Ableton live but to a MIDI output port. What you need is to use a virtual MIDI port that you can send data to and it can present that data back to another application. The MIDI Yoke application can do this.

like image 43
Mark Heath Avatar answered Oct 14 '22 01:10

Mark Heath