Im struggling with MIDI volume changes - 10 line code sample attached

Status
Not open for further replies.

colorado_hick

Well-known member
I am having trouble sending volume changes over USB Midi.
I was expecting this example to play a note (midi 68 = Bb I think) then increase it from a volume of 0 to 127 then cut it out for 2 seconds.
However I can not hear any volume change, just the start and a steady tone for about 5 seconds then a stop.
I am using a virtual Synth in ableton lite. The same synth seems to work well with pitch bends.
Am I missing something?
Thanks

Code:
void setup() {
 
}

void loop() {
  // put your main code here, to run repeatedly
usbMIDI.sendNoteOn(68,99,1);
for (int x = 1; x < 127; x++){
  usbMIDI.sendControlChange(7, x, 1);
  delay(50);  
}
usbMIDI.sendNoteOff(68,0,1);
delay(2000);


}
 
Status
Not open for further replies.
Back
Top