Very interested in this! It changes my whole design.
Fatlimey how well is this working in your tests?I should have parts next week for my own expansion project and was wondering if i could get some more info on the firmware changes.My brother whos a software engineer said it wont be any problem but any info you may have would be appreciated
Thanks
The instructions for building the firmware are on a Sticky thread in this forum.
The changes you need are (I'm remembering the function and variable names off the top of me head here, so check the source):
- Change three of the digital input ports to be outputs. You do this using the DDRD register (Data Direction Register for Port D)
- You add 8 analog inputs to the g_exp_analog_prev[] array (global, expansion, analog previous value), giving you a total of 11. This array hold the previous analog value so we can see if the knob has moved since we last checked.
- To fill the g_exp_analog_prev[] array you need to replace one of the "read_analog(0)" calls with a short loop that sets the PORTD bits to tell the 4051 which input to connect to the output, then executes a read_analog(0).
- Finish filling the analog reads using the normal "read_analog(1); read_analog(2); read_analog(3);"
- Make the same changes in the main loop where it fills the array "analog_value[]";
- In the main loop where it outputs CC values for analog changes, alter any loop from 0..4 to a loop over 0..NUM_ANALOG, where you define a global NUM_ANALOG to be 11.
- erm, that's it.
That's pretty much it. You'll be generating CCs in groups of two per knob starting from CC16. Oh, and you have to make sure the MIDI NoteOn numbers for your smart faders don't clash with any notes used by the keypad.
Thanks a million!! Im getting excited and cant wait for my parts to arrive
Fatlimey i was wondering whats the easiest way to add more leds to the midifighter?With the extra buttons im adding i could really use a few more leds? Any suggestions?
We have four techniques:
1. add another LED controller to the chain. Some tricky resoldering in there.
2. Use the digital inputs also as outputs. For most of the time you output the LED state through the pin, remembering to set the PORTD and DDRD registers to enable the internal pull-up resistor. When it comes time to poll the switch, the output is turned into an input, the switch is read then the port is switched back to output. Do this quick enough and the LED will appear constantly on.
3. Add another small microcontroller that will read the button states and set the LED itself, independent of what the main CPU is doing. The main CPU never sees or knows anything about these LEDs, and their state is updated by the second micro. Cheaper than you might imagine.
4. Do option 3, but but the micro on an SPI or I2C bus as a slave, so that it reads instructions sent by the main controller. This way the main machine controls the lights indirectly by sending instructions to a slave processor. The protocol need not be complex, just send bytes with a bit set for each LED.
what's the theoretical maximum number of analogues using a multiplexer?
also, is encoder support possible? this teensyduino-based controller looks like it uses one: http://www.noisybox.net/electronics/dickhole_keypiss/
8 per multiplexer,1 multiplexer per analogue input so 32 in total.as far as I can figure that's it for the simple solution.as for encoders I have no idea
I'm still waiting on a few parts and need to re-order my multiplexers(accidentally got the wrong ones and they're so small its hard to see them LOL) and then we'll see what mad controller the midifighter can morph into!
ok so i have multiplexers wired up and am getting some odd results,seems like im getting notes of F-1, F#-1 G-1. If i turn on midi learn in traktor it seems like its constantly scrolling through the notes.Have i missed something? Any advice?
|
Bookmarks