646 B
646 B
Direct MIDI Output
Send MIDI messages directly through the interface without using the element system.
Original:
MIDI-Output.ino
#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"
#include <cs_midi.h>
using namespace cs;
BluetoothMIDI_Interface midi;
const MIDIAddress address {MIDI_Notes::C[4], Channel_1};
const uint8_t velocity = 0x7F;
int main() {
stdio_init_all();
if (cyw43_arch_init()) return 1;
midi.begin();
while (true) {
midi.sendNoteOn(address, velocity);
sleep_ms(500);
midi.sendNoteOff(address, velocity);
sleep_ms(500);
midi.update();
}
}