Replies: 2 comments 2 replies
-
I see some kind of chord functionality in the documentation but im not sure how it works and it doesnt seem to have any examples attached... right now im manually making if functions for every chord and the code is getting super long lol |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can use something like this: #include <Control_Surface.h>
template <class Sender> void playChord(
Sender &sender,
MIDIAddress note,
const IChord &chord,
uint8_t velocity
) {
sender.sendNoteOn(note, velocity);
for (int8_t offset : chord)
sender.sendNoteOn(note + offset, velocity);
}
USBMIDI_Interface midi;
void setup() {
midi.begin();
}
void loop() {
static Timer<millis> timer {1000};
static uint8_t velocity = 0;
if (timer) {
velocity = 0x7F - velocity;
playChord(midi, MIDI_Notes::C(3), Chords::DominantSeventh, velocity);
}
} https://tttapa.github.io/Control-Surface-doc/Doxygen/df/d20/namespaceChords.html |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
im making a guitar like instrument where you select the chord but it only plays the notes of the chord when you strum,, any good pointers?
Beta Was this translation helpful? Give feedback.
All reactions