Hello,
i'm a newbie in arduino programming!
How can i include the sparkfun midishield in Pieter P's "Midi-Chord-Buttons" Sketch
#include "MIDIButtonChord.hpp"
#include "Notes.hpp"constexpr uint8_t channel = 1; // MIDI channel to send on
MIDIButtonChord buttons[] = {
{Chords::Major, 2, note(C, 4), channel}, // Major C chord in the 4th octave, button between pin 2 and ground, MIDI channel 1
{Chords::Minor, 3, note(D, 4), channel},
{Chords::Minor, 4, note(E, 4), channel},
{Chords::MajorFirstInv, 5, note(F, 4), channel},
{Chords::MajorSecondInv, 6, note(G, 4), channel},
{Chords::MinorSecondInv, 7, note(A, 4), channel},
{Chords::Diminished, 8, note(B, 4), channel},
};/*
- You can change the chords afterwards using
- buttons[0].setChord(Chords::MajorSeventh);
- for example.
*/void setup() {
MIDI.begin();
for (MIDIButtonChord &button : buttons)
button.begin();
}void loop() {
for (MIDIButtonChord &button : buttons)
button.update();
}
Thanks for helping
Marco
MIDI-Chord-Buttons.zip (5.27 KB)
