Hi all,
About a week ago, I posted a thread about a concept for an 88 key MIDI keyboard. Since then, I've started full-scale design and have been tinkering around with an UNO to get my bearings. I realized, though, that it would not be possible to use an UNO to get my intended result, so I decided to upgrade the project to a MEGA R3 (the elegoo knockoff).
Now, with the mega, I have plans to connect 135 keys in a key matrix, scanning with 9 GND/HIGH 'output' lines, and 15 input_pullup 'input' lines. Additionally, I'm using 6 potentiometers; 1 dedicated to note velocity, 1 dedicated to the value of the lowest note (from 0 to 127), and the other 4 free to be swapped between different midi CC for stuff like volume, mod, etc. I'm also including a jack for a sustain pedal.
I also now have enough pins to incorporate a 16x2 LCD display over I2C, which I'll use to show the current mapping, alongside both the value of the current root note as well as current velocity. Midi will be sent out through a dedicated MIDI out port, the 5 pin female one. I've attached two pictures I made to represent all the above information.
My question is this: does anyone here who has experience with this MCU or these types of projects foresee any memory or storage limitations occuring? Just to summarize, here's what the ATmega2560 will be doing continuously:
-
Scanning a 9x15 key matrix (with diodes for anti-ghosting/polyphony) and noting which keys are pressed
-
If a potentiometer changes its value, either A. send it as a midi CC message if it's one of the 4 CC knobs, B. set the velocity of all following notes to the value of the potentiometer if it's the velocity knob, or C. set the root note # of the keyboard mapping if it's the note shift knob
-
Map all midi keys through a mapping list to convert the midi notes they output to that of the specific mapping
-
Read inputs from a sustain pedal
-
Output valid MIDI stream through midi port
-
Update LCD panel with name of current mapping, root note, and velocity of sent notes
I plan on using the following libraries: Wire and LiquidCrystal for the screen, Midi, and Keypad (though I'm open to writing some of their functionality by hand if it can save memory).
Do you think I'll get close to the memory limit, or that the MEGA will experience any slowdows while executing the required code? Thanks so much for your input.
Whoops! I guess the files I uploaded were too big. Here they are hosted on IMGUR: