I’ve successfully routed all my oF midi data out to a virtual midi bus that gets sent to Ableton. I have no problem sending noteOn/noteOff to Ableton instruments on midi Channel 1, but for some reason it won’t accept my Control Messages. I’m doing “midiOut.sendControlChange(1, 7, ofRandom(127));” and absolutely nothing is happening.
Any help is greatly appreciated.
Ok, ended up figuring it out. So like I said you need to make a virtual midi port (https://www.ableton.com/en/articles/using-virtual-MIDI-buses-live/)
then Ableton acts exactly as if you plugged a controller into your computer. So what I was missing was that I needed to physically click the midi tab in Ableton have all the controls turn blue and then tap on whatever parameter I want to control. Make sure you’re running an oF program thats saying “midiOut.sendControlChange(int channel, int control, int value);” This way it maps to whatever control you clicked on and you can do what you want with it.
I am trying to do the same thing, could you tell me what kind of virtual midi bus you are using. I’m using the midi patchbay on mac, but it seems like when I send up a input in the midipatchbay, ableton also recognize it as a output to that virtual input…
never mind dude, i figured it out. thanks for your post though.
I had a little noob question.
in the above line, what does ‘int control’ stand for? what value am i supposed to put over there?
@silvergravel that would be something like a knob or slider on a midi controller that you would want to send midi message values of 0 - 127. For instance if you’re familiar with something like Ableton, when you set a knob to a parameter on a synth, it would say sending from control number 5 and then a bunch of values 0 -127 next to it as you move the slider. Hope that helps.
o yes. so i am trying oF to ableton communication. I followed your code
and it worked beautifully!
i was wondering if it even matters f i change that number 7 to say a 6 or a 10…
also if its not much of a hassle, i wanted to send multiple (diffrent) midi outputs to ableton… could you guide me as to what i need to look at when trying to do that?
nevermind! figured it out!
Just to clarify @silvergravel, the int control paratemer allows you send different control messages. Ableton (on other midi-enabled software) allow you to map a parameter to a midi controller via an adress that is composed of the midi channel and the control number. When using a single midi message it’s unimportant if the control is 0 or 120, as long as it’s been correctly mapped. Originaly this construction allowed you to link several midi devices together (each on a different channel ) with a midi through port and control different parameters from each control (sliders or knobs of a same device).
For example, you could have a midi keyboard in channel 0 with a slider (control 1) mapped to the envelope attack of a drum machine and another slider (control 2) to control it’s decay. You could have a second midi keyboard in channel 1 and have it’s sliders (controls 1 and 2) mapped to 2 other parameters.
It’s a silly example, but I think it ilustrates how and why midi works as it does.
aaa… i think i understand now @cabral1349. so essentially even if im using the same channel, if my int control is say 1 & 2, it would allow me to control two different parameters?
What i have done right now is, i have 3 separate midi signals going out from oF. the code ive used for each of them is as folows:
midiOut.sendControlChange(1, 7, red);
midiOut.sendControlChange(2, 7, green);
midiOut.sendControlChange(3, 7, blue);
so as you can see, ive used the same number for each of the ‘int control’ but i have used 3 separate channels for the 3 different outputs. on ableton i have mapped these outputs to 3 separate knobs and seems to be working fine. so are you telling me that if had had kept the channels same, say channel 1 and just changed the int control for each of the 3 outputs, something like this:
midiOut.sendControlChange(1, 7, red);
midiOut.sendControlChange(1, 8, green);
midiOut.sendControlChange(1, 9, blue);
would i achieve the same result?
Yes, when dealing with software control and channel are interchangeable. They only differ in hardware, where you can set the whole hardware to a different midi channel but not each individual knob or slider.
But for example, in Live you can tell a Midi Track to only listen to a certain channel. That way you can have two keyboard controllers, each send note messages to different VSTs in live. With usb-midi devices you can also tell live to listen to a certain device by name, but that’s a recent inovation of midi, which is protocol from the 70’s if I’m not mistaken.
aaa! ok i think i get it now… im really new to ableton and oF. so far i havnt started using hardware with ableton. Im just trying out some experiments with oF & ableton, so on the software side i think i have gotten decent clarity now.