It all depends on what the VST is expecting but I would expect it is a control change message. The standard for these is to set it to zero to represent off and to 127, or 0x7F ( the same number ) for a logic one or on.
I have been testing with (0,1,1)
? What does that mean?
Assuming it means channel zero, CC number one, give it a value of one, then I would not expect this to work, try (0,1,127). But you need to know what CC number the VST is expecting. Maybe write a bit of test code that cycles through all the CC numbers and see if the VST responds.
It may also depend on what is running the VSTi (they're rarely standalone). Many DAWs/VST Hosts have a MIDI Learn or similar function used to map incoming CC messages to specific VSTi functions. Until that is set up nothing will happen. So what VST are you trying to use and what is hosting it?
Many CC message types have a fixed purpose e.g. CC1 is the mod wheel, CC7 is channel volume etc. so VST specific controls are usually mapped to the undefined or generic set of CCs, e.g. CC80-83 are generic ON/OFF switches. See MIDI 1.0 Control Change Messages (Data Bytes)
Grumpy_Mike:
It all depends on what the VST is expecting but I would expect it is a control change message. The standard for these is to set it to zero to represent off and to 127, or 0x7F ( the same number ) for a logic one or on.
? What does that mean?
Assuming it means channel zero, CC number one, give it a value of one, then I would not expect this to work, try (0,1,127). But you need to know what CC number the VST is expecting. Maybe write a bit of test code that cycles through all the CC numbers and see if the VST responds.
Sorry, yes according to the MIDIUSB library, controlChange(channel, control number, value). I am using Ableton with Arturia VST's.
slipstick:
It may also depend on what is running the VSTi (they're rarely standalone). Many DAWs/VST Hosts have a MIDI Learn or similar function used to map incoming CC messages to specific VSTi functions. Until that is set up nothing will happen. So what VST are you trying to use and what is hosting it?
Many CC message types have a fixed purpose e.g. CC1 is the mod wheel, CC7 is channel volume etc. so VST specific controls are usually mapped to the undefined or generic set of CCs, e.g. CC80-83 are generic ON/OFF switches. See MIDI 1.0 Control Change Messages (Data Bytes)
Steve
I am using Ableton with Arturia VST's. I am using the midi learn button to the point where it says "waiting for input" but I can't get it to accept anything I send.
Grumpy_Mike:
So post the code you have.
Did you try (0,1,127)?
Are there any free Arturia VST's I could use. I have Ableton so maybe I could try it.
I believe I did try that. But I will try again once I get home.
I don't believe Arturia has any free VSTs.
I am aware of some issues with my code, particularly the debounce, but in MIDI-OX (MIDI listening software) i do get midi signals labeled as "Control Change", but they appear to not do anything in Ableton.
#include <frequencyToNote.h>
#include <MIDIUSB.h>
#include <pitchToFrequency.h>
#include <pitchToNote.h>
#define INPUT_PIN_7 7
#define SELECT_PIN_8 8
#define SELECT_PIN_9 9
#define SELECT_PIN_10 10
#define SELECT_PIN_11 11
unsigned long debounce;
void controlChange(byte channel, byte control, byte value) {
midiEventPacket_t event = {0x0B, 0xB0 | channel, control, value};
MidiUSB.sendMIDI(event);
}
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(SELECT_PIN_8, OUTPUT); //setting multiplexer selector pins to output
pinMode(SELECT_PIN_9, OUTPUT);
pinMode(SELECT_PIN_10, OUTPUT);
pinMode(SELECT_PIN_11, OUTPUT);
pinMode(INPUT_PIN_7, INPUT); //setting multiplexer input to pin 7 input
}
void loop() {
digitalWrite(SELECT_PIN_8, LOW); //selecting Y0 input on the multiplexer
digitalWrite(SELECT_PIN_9, LOW); //selecting Y0 input on the multiplexer
digitalWrite(SELECT_PIN_10, LOW); //selecting Y0 input on the multiplexer
digitalWrite(SELECT_PIN_11, LOW); //selecting Y0 input on the multiplexer
if (digitalRead(INPUT_PIN_7) == HIGH && millis() - debounce > 100){
controlChange(0,1,1);
debounce = millis();
}
}
// First parameter is the event type (0x0B = control change).
// Second parameter is the event type, combined with the channel.
// Third parameter is the control number number (0-119).
// Fourth parameter is the control value (0-127).
MIDI commands
0x80 Note Off
0x90 Note On
0xA0 Aftertouch
0xB0 Continuous controller
0xC0 Patch change
0xD0 Channel Pressure
0xE0 Pitch bend
0xF0 (non-musical commands)
try this:
{0x0B, 0x90 | 0, 48, 128}
you want on command... 0xB0 is is for a controller like the piano pedal... it will make no sound.
wolframore:
// First parameter is the event type (0x0B = control change).
// Second parameter is the event type, combined with the channel.
// Third parameter is the control number number (0-119).
// Fourth parameter is the control value (0-127).
MIDI commands
0x80 Note Off
0x90 Note On
0xA0 Aftertouch
0xB0 Continuous controller
0xC0 Patch change
0xD0 Channel Pressure
0xE0 Pitch bend
0xF0 (non-musical commands)
try this:
{0x0B, 0x90 | 0, 48, 128}
you want on command... 0xB0 is is for a controller like the piano pedal... it will make no sound.
0 is channel 1
48 is middle C
127 is velocity
I thought On command is like Note ON, i'm not trying to play notes. I will try it though.
Your original code looks better and if you're seeing CC messages in MIDI-OX then it's doing approximately the right thing. What exactly is MIDI-OX displaying them as?
I'd guess your problem is now just getting the right setup in Ableton. Unfortunately it's ages since I used that so I can't be much help there. I vaguely remember having to set up a MIDI Port and then do some mapping by selecting the control in the VST and then sending CC messages. Maybe it needs to see some movement from the controller, normally moving a knob or flicking a switch. Try sending a CC with value 0 (off), short delay then another with value 127 (on).
Or perhaps an Ableton Live forum would be more help
slipstick:
Your original code looks better and if you're seeing CC messages in MIDI-OX then it's doing approximately the right thing. What exactly is MIDI-OX displaying them as?
I'd guess your problem is now just getting the right setup in Ableton. Unfortunately it's ages since I used that so I can't be much help there. I vaguely remember having to set up a MIDI Port and then do some mapping by selecting the control in the VST and then sending CC messages. Maybe it needs to see some movement from the controller, normally moving a knob or flicking a switch. Try sending a CC with value 0 (off), short delay then another with value 127 (on).
Or perhaps an Ableton Live forum would be more help
Steve
Thanks Steve
I actually booted up the VST outside of Ableton and was able to map buttons with the "learn" feature. It appears now to be an Ableton issue not accepting the midi. However, I know Ableton sees the incoming midi because it blinks when I press a button. However those signals don't appear to be making it to the VST inside of Ableton.