Created
January 4, 2024 15:05
-
-
Save NickCulbertson/5bb7c0fa5a386a9d4b42b0b69da9a56e to your computer and use it in GitHub Desktop.
This is an Arduino Sketch for a simple arcade button MIDI Controller using the Control Surface library and Raspberry Pi Pico
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Control_Surface.h> | |
// | |
USBMIDI_Interface midi; | |
using namespace MIDI_Notes; | |
// Button Rows | |
NoteButton button1 = { 2, {note(Eb, 3), CHANNEL_1}}; | |
NoteButton button2 = { 3, {note( D, 3), CHANNEL_1}}; | |
NoteButton button3 = { 4, {note(Db, 3), CHANNEL_1}}; | |
NoteButton button4 = { 5, {note( C, 3), CHANNEL_1}}; | |
NoteButton button5 = { 6, {note( B, 2), CHANNEL_1}}; | |
NoteButton button6 = { 7, {note(Bb, 2), CHANNEL_1}}; | |
NoteButton button7 = { 8, {note( A, 2), CHANNEL_1}}; | |
NoteButton button8 = { 9, {note(Ab, 2), CHANNEL_1}}; | |
NoteButton button9 = {10, {note( G, 2), CHANNEL_1}}; | |
NoteButton button10 = {11, {note(Gb, 2), CHANNEL_1}}; | |
NoteButton button11 = {12, {note(F_, 2), CHANNEL_1}}; | |
NoteButton button12 = {13, {note(E , 2), CHANNEL_1}}; | |
NoteButton button13 = {18, {note(Eb, 2), CHANNEL_1}}; | |
NoteButton button14 = {19, {note( D, 2), CHANNEL_1}}; | |
NoteButton button15 = {20, {note(Db, 2), CHANNEL_1}}; | |
NoteButton button16 = {21, {note( C, 2), CHANNEL_1}}; | |
void setup() { | |
// Initialize everything | |
Control_Surface.begin(); | |
} | |
void loop() { | |
// Update the Control Surface (check whether the potentiometer's input has | |
// changed since last time, if so, send the new value over BLE MIDI). | |
Control_Surface.loop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment