Control Surface  1.1.1
MIDI Control Surface library for Arduino
Transpose-Octave-NC-Button.ino

Transpose-Octave-NC-Button

https://github.com/tttapa/Control-Surface/issues/74

// Transposer that transposes one octave (12 semitones) at a time,
// from 0 to +1 octave.
Transposer<0, +1> transposer(12);
// Push button on pin 2 to transpose.
IncrementSelector<2> selector = {transposer, 2};
using namespace MIDI_Notes;
Bankable::NoteButton notebutton = {
transposer, // bank/transposer
3, // pin
note(C, 4), // address/note
};
void setup() {
selector.invert(); // normally closed button
}
void loop() {
}
USBMIDI_Interface
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
Definition: USBMIDI_Interface.hpp:35
Bankable::NoteButton
A class of MIDIOutputElements that read the input of a momentary push button or switch,...
Definition: Bankable/NoteButton.hpp:22
IncrementSelector
Selector with one button that increments the selection.
Definition: IncrementSelector.hpp:58
GenericIncrementSelector< N >::invert
void invert()
Definition: IncrementSelector.hpp:35
Transposer
Definition: Transposer.hpp:10
Control_Surface.h
The main header file that includes all Control-Surface header files.
Control_Surface_::loop
void loop()
Update all MIDI elements, send MIDI events and read MIDI input.
Definition: Control_Surface_Class.cpp:48
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition: Control_Surface_Class.cpp:176
MIDI_Notes::note
constexpr int8_t note(int8_t note, int8_t numOctave)
Get the MIDI note in the given octave.
Definition: Notes.hpp:35
MIDI_Notes
MIDI note names.
Definition: Notes.hpp:16
MIDI_Notes::C
constexpr int8_t C
Definition: Notes.hpp:18
Control_Surface_::begin
void begin()
Initialize the Control_Surface.
Definition: Control_Surface_Class.cpp:25