Control Surface main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
Pitch-Bend-Value.ino

Pitch-Bend-Value

This example demonstrates how to listen for incoming MIDI Pitch Bend events.

Boards: 🛈
AVR, AVR USB, Nano Every, Due, Nano 33 IoT, Nano 33 BLE, UNO R4, Pi Pico, Teensy 3.x, ESP32, ESP8266

Connections

None.

Behavior

If a MIDI Pitch Bend message on channel 1 is received, its value is printed to the serial port.

Mapping

Route the MIDI output of a program or device that sends MIDI Pitch Bend messages to the Arduino's MIDI input.

Written by PieterP, 2020-09-08
https://github.com/tttapa/Control-Surface

// Instantiate an object that listens for MIDI Pitch Bend messages on channel 1.
void setup() {
Serial.begin(115200);
}
void loop() {
// If the Pitch Bend value changed
if (pb.getDirty()) {
// Print it
Serial.println(pb.getValue());
// Clear the dirty flag to acknowledge the change
pb.clearDirty();
}
}
constexpr Channel Channel_1
Definition Channel.hpp:118
The main header file that includes all Control-Surface header files.
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
void begin()
Initialize the Control_Surface.
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
Class that listens for MIDI Pitch Bend events on a single address and saves their value.
Definition PBValue.hpp:15
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.