Last active
December 19, 2024 23:58
-
-
Save NickCulbertson/c68b71ba8eb56eee6320ad58702a9374 to your computer and use it in GitHub Desktop.
This is a Teensy/Arduino sketch for a tiny MIDI Controller with transpose.
This file contains hidden or 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; | |
// Transposer that can transpose from one octave down to one octave up | |
Transposer<-12, +12> transposer; | |
// Selector to change the transposition | |
IncrementDecrementSelector<transposer.getNumberOfBanks()> selector { | |
transposer, {10, 11}, Wrap::Clamp, | |
}; | |
// Array of NoteButton objects | |
Bankable::NoteButton buttons[] { | |
{transposer, 13, note(C, 2)}, {transposer, 23, note(D, 2)}, | |
// Additional buttons for pins 0-7 | |
// {transposer, 0, note(C, 4)}, {transposer, 1, note(D, 4)}, | |
// {transposer, 2, note(E, 4)}, {transposer, 3, note(F_, 4)}, | |
// {transposer, 4, note(G, 4)}, {transposer, 5, note(A, 4)}, | |
// {transposer, 6, note(B, 4)}, {transposer, 7, note(C, 5)}, | |
}; | |
void setup() { | |
Control_Surface.begin(); | |
} | |
void loop() { | |
Control_Surface.loop(); | |
} |
This is the script I used for ESP32. I wasn't able to get Control_Surface to work reliably with ESP32
https://gist.github.com/NickCulbertson/9bb6122f4fb12c04d71e156c788c3985
I made it in this video: https://youtu.be/yeVNayMNu6s?si=l4XJqbTX0UJFD5Tl
Good luck!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey mate,
mayu I ask you if by any luck do you have something similar with a ESP32?
even better with BLE also included