Control Surface
2.1.2
MIDI Control Surface library for Arduino
Toggle main menu visibility
Loading...
Searching...
No Matches
Transpose-Octave-NC-Button.ino
Transpose-Octave-NC-Button
https://github.com/tttapa/Control-Surface/issues/74
#include <
Control_Surface.h
>
USBMIDI_Interface
midi;
// 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};
Bankable::NoteButton
notebutton {
transposer,
// bank/transposer
3,
// pin
MIDI_Notes::C
[4],
// address/note
};
void
setup() {
selector.
invert
();
// normally closed button
Control_Surface
.begin();
}
void
loop() {
Control_Surface
.loop();
}
Control_Surface.h
The main header file that includes all Control-Surface header files.
Control_Surface
Control_Surface_ & Control_Surface
A predefined instance of the Control Surface to use in the Arduino sketches.
Definition
Control_Surface_Class.cpp:338
Bankable::NoteButton
A class of MIDIOutputElements that read the input of a momentary push button or switch,...
Definition
Bankable/NoteButton.hpp:22
GenericIncrementSelector::invert
void invert()
Definition
IncrementSelector.hpp:43
IncrementSelector
Selector with one button that increments the selection.
Definition
IncrementSelector.hpp:64
Transposer
Class for transposing the address of NoteButton and other MIDI elements.
Definition
Transposer.hpp:11
USBMIDI_Interface
A class for MIDI interfaces sending MIDI messages over a USB MIDI connection.
Definition
USBMIDI_Interface.hpp:165
MIDI_Notes::C
constexpr Note C
C (Do).
Definition
Notes.hpp:56
Generated by
1.17.0