CreepyPants
2019-08-28 18:04:00
I have a 4x8 button grid that sends Note On/Off info to MTPro/BomeBox that is then translated into combinations of CC messages and sent to a sequencer. I am using the fact that the incoming Note #'s are sequential as part of my code. That is, I test to ensure the range of the incoming Note On msg, then I do some math stuff on the Note # value to determine Row & Column, which is used to calculate what the outgoing info is going to be.
However, I'm working on a section that I may need a bit more flexibility because: reasons, and I'm thinking about that time when I want to use a different button controller, or even build my own controller - it'd have to be in the same sort of sequential button/Note convention.
I'm pondering updating my code to define a series of Global Variables for Inc Note #. That is, "Hey, this button here that does this thing. Right now it's looking for Note 48. But I'm going to make it look for note KA (Global Variable)"
I recognise this means I will have to either put in at least 32 If/Then statements to assign values to variables at the top of my existing Translator or copy my Translator 32 times for the different Incoming Note Values entombed in Global Variables, but in my head this makes the whole thing super flexible and applicable to ANY button controller or group of button controllers or even keyboard controller Note Ons. (Plus, where the Note Ons don't have to be sequential - where Button 1 and Button 2 are next to each other, I can just as easily have any actions that were previously Button 1 be a "C' and Button 2 which was previously next to Button 1 be an "A", thereby allowing me to construct 'chords' to do a thing, rather than discrete button presses...but I digest.)
Note: I already use plenty of Globals in my script for things like "Button Colour On" and "Button Colour Off" because I prefer flexibility, and I change my mind about what colours I like (next step is to define 'themes' for the button controller! LOL).
I'm just wondering if I'm overlooking some sort of 'under the hood' functionality that's going to lead me to tears, frustration, and an unending sense of dramatic, yet pervasive ennui. Should I avoid doing this (and not 'waste' the hours (days or weeks in my case)) because ultimately it will be problematic?