hi all, op of the script here who has been mia for a really long time… long story! but I am back, and have been working through this again, and realize now that I should be working through this whole discussion too! I’ve just been off of lines and unemployed and stuff (before the virus, now I actually have a job weirdly), and hadn’t really realized people were working on this! I have a fork I have been working on I think I am about to merge (after looking at the prs)
What I have done on my branch (apc_dev, but its more than that) is made a core.lua file that handles has all the device management and common connection stuff, which passes on the half formed midigrid object to any number of “view” files.
the midigrid.lua file/lib is for straight conversion of midi to led, based on the config file. It wouldn’t make sense to do a, e.g., midigrid.init(128), to a generic midigrid, because I think we should leave the possibility open of there being native 128 button midigrids, and because of this, that init argument is confusing: are we talking about the grid itself, or the emulation?
emulation should still be separate files, but we shouldn’t talk about “quads” anymore in those files, although I have left the config options the same. we should simply say that mg_128.lua has a 128 grid buffer, with two separate “views”, and mg_256 is a 256 buffer with four views on it. But, the catch can be, the views of the buffer can easily be arbitrary, and one can make versions like a three view cheatcodes version. there is still some stuff to be hammered out, on my end, but I will look at all this other work and synthesize and we can figure out the right master branch.
really sorry I haven’t been around to discuss and troubleshoot and pr receive! great to see this so active.