UMS Mega Keys – DIY Kit

Learn How to Build a MIDI Controller! This is a MIDI controller and not a standalone mixer; requires software to control. Features 26 retro arcade game butttons with color options 96 assignable buttons accessible via 4 banks 20 assignable potentiometers accessible via 4 banks Dedicated Bank Select buttons Ultra-compact design lets you create anywhere USB-powered;…

Category:

Description

Learn How to Build a MIDI Controller!
This is a MIDI controller and not a standalone mixer; requires software to control.

Features

  • 26 retro arcade game butttons with color options
  • 96 assignable buttons accessible via 4 banks
  • 20 assignable potentiometers accessible via 4 banks
  • Dedicated Bank Select buttons
  • Ultra-compact design lets you create anywhere
  • USB-powered; no power adapter required

Specifications
Dimension: 32cm x 25cm x 5cm
Optional 9V 1A Arduino power supply

Code

#include

#include // std::any_of

USBMIDI_Interface midi; // MIDI Interface to use

Bank<4> bank(24);

IncrementDecrementSelectorLEDs<4> bankSelector = {
bank,
{31, 33}, // button pins
{39, 41, 43, 45}, // LED pins
};

using namespace MIDI_CC;
Bankable::CCPotentiometer potentiometers[] = {
{bank, A0, {0x46, CHANNEL_2}},
{bank, A1, {0x47, CHANNEL_2}},
{bank, A2, {0x48, CHANNEL_2}},
{bank, A3, {0x49, CHANNEL_2}},
{bank, A4, {0x4A, CHANNEL_2}},
};

Bankable::NoteButton muteButtons[] = {
{bank, 13, 0x20},
{bank, 12, 0x21},
{bank, 11, 0x22},
{bank, 10, 0x23},
{bank, 9, 0x24},
{bank, 8, 0x25},

{bank, 7, 0x26},
{bank, 6, 0x27},
{bank, 5, 0x28},
{bank, 4, 0x29},
{bank, 3, 0x2A},
{bank, 2, 0x2B},

{bank, 14, 0x2C},
{bank, 15, 0x2D},
{bank, 16, 0x2E},
{bank, 17, 0x2F},
{bank, 18, 0x30},
{bank, 19, 0x31},

{bank, 20, 0x32},
{bank, 21, 0x33},
{bank, 23, 0x34},
{bank, 25, 0x35},
{bank, 27, 0x36},
{bank, 29, 0x37},
};

constexpr pin_t ledPin = 47;

// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //

void setup() {
Control_Surface.begin();
pinMode(ledPin, OUTPUT);
}

// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //

void loop() {
Control_Surface.loop();

// Function that checks if a given button is pressed
auto checkButtonPressed = [](const Bankable::NoteButton &button) {
return button.getButtonState() == Button::Pressed;
};
// If any of the push buttons is pressed
bool pressed = std::any_of(std::begin(muteButtons), std::end(muteButtons),
checkButtonPressed);
// Turn on the LED
digitalWrite(ledPin, pressed);
}

Assembly Steps

Assembly Instruction