Go Down

Topic: Can MidiUSB-Library send program change messages? (Read 136 times) previous topic - next topic

erlingzu

I just successfully built my first midi controller (and my first arduino project) using the midiUSB-library. A piezo velocity sensitive bassdrum pedal sending midi notes. I´m planning on building a more advanced controller for my ipad, but can´t find any info on whether it is possible to send program change (PC) messages using the midiUSB-library. Can the MidiUSB-Library send program change messages? And if so - what is the command?
 Thanks!

PieterP

#1
Jun 17, 2018, 04:32 pm Last Edit: Jun 17, 2018, 04:36 pm by PieterP
Sure, there's nothing special about program change messages.

Read this: https://tttapa.github.io/Arduino/MIDI/Chap01-MIDI-Protocol.html

Code: [Select]
void programChange(byte channel, byte program) {
  midiEventPacket_t pc = {0x0C, 0xC0 | channel, program, 0};
  MidiUSB.sendMIDI(pc);
}


See chapter 4 of the USB-MIDI specification.

Pieter


Go Up