If you structure your code correctly, it shouldn’t be too much more than doing it any other way. The main brain would be the simplest, as it’s sole job is to pass messages around.
You could structure the code in such a way that each module would run the same code, just with different configurations.
How many inputs do I need to check?
What type of input is it (button, rotary, fader, etc)
What are the pin(s) for each input?
The main loop would just go through the list of inputs, and depending on the type of input, it would call the appropriate input checking method.
You would need to come up with some sort of standard midi note scheme so you don’t end up having to alter pre-existing modules. If you know any one module wont have any more than X inputs, then it should be fairly simple to arrange the notes in banks leaving gaps between them for future expansion.
You should take a look at the midifighter code for a great example of how they deal with multiple banks on a single set of buttons. The idea should translate to multiple banks on multiple sets of buttons quite well.
One side effect of this approach would be that each module should be able to be used as a standalone controller. Assuming everything comes together like it is in my head.
The system could be as such: a main brain controller that contains the xfader, channel faders and channel related functions. Then you can have an effects module, a control/transport module, loops module, midifighter module, etc. Each module though, could be connected to the pc on it’s own and work just fine —OR— be hooked into the main brain and become a small piece of the overall larger controller.
Or the main controller could be kept simple with a few buttons and a cross fader. Then each channel could itself be a module, allowing you to have a 2/3/4+ channel controller if you should so choose.
heh, sorry for the rambling, but once I get into an idea, my brain just goes nuts 