[T2.0] First MIDI controller, simple project, banks, guidance needed

Status
Not open for further replies.

Lucasperesbet

New member
Hi there nice people:

I'm pursing a project of making a simple MIDI controller inside the shell of a guitar pedal. I've searched the forums and google, but as a total noob I just got more confused, so I'm just looking for some direction here :)

I say it's simple because it envolves only 4 knobs (10K potentiometers), 1 button and 1 LED. But that is my first inquiry into electronics and programming. I already know how to put the circuit together, but that is about it. So... I'm looking for a little bit of insight here on where could I learn how to put the code together, if it is possible to make it and how it might look like.

Here is how I envisioned the functions: 4 knobs that can be mapped to my DAW, and a button to change between 4 banks (meaning, pressing the button would let me map another things to the same knob for three times, until I pressed it for the fourth time, which would bring me back to the original first mappings).

The LED should show me in which bank I'm at by simply flashing 1, 2, 3 times and resting for 1,5sec between the flashings for the first 3 banks, and then being continuously on when on the 4th bank.

I feel like its a lot to grasp for a first project, but I'm determined to learn. Again, if you people could just point out where to start looking, that would be great, because, again, I'm a total noob.

Thank you! Srry for the bad English, and greetings from Brazil!
 
Last edited:
Should be feasible but what should the controller do when brought to a new bank but the pots are not where they were when that bank was active last?

If they just update then you just need CC assignment arrays with a bank index... search 'midi' and 'bank' for details/advice... mostly they are for buttons but if you're not getting fancy with remembering previous values it is much the same for pots.

but if you want them to match where they were before updating then that's a lot trickier but still possible.
 
Thank you Oddsson, I think I saw you on every thread I've researched, you're always helpful. I think it is more feasible to start with a simple code to make the controller work on 1 bank and then try to implement the banks. I just want to be sure about this: it is possible to have 4 banks changing between themselves with just one button? Thanks again!
 
Yes... that part should be no problem. The LED behaviour will likely take some trial and error and you'll have to learn how to use the ellapsedmillis() timer method.

...do you get what I mean about 'picking up' the old values?

Normally, you don't want a parameter to jump to a new value when you change banks as the pots are set from the previous bank with presumably different parameters.

If so you need an extra set of conditions in your logic before updating midi.

Normally you check that the midi value implied by the current reading is different from the last value sent to avoid redundant messages; but for this feature you also need to check the value matches the old one after a bank change before you start updating on the other conditions again...

So start with four pots and getting usable midi from them... smoothing and scaling the DAC data are the main issues plus limiting midi to changed values only and perhaps a minimum time between updated midi. ResponsiveAnalogRead and ellapsedmillis libraries can help with these.


...consider using an arrays for CC assignment and stored last-sent values.

Then add a bank system by turning the variables into arrays or the arrays into two-dimensional arrays with a 'bank' indicator value used to access each of the four banks of data...

Get this working with hard-coded variable first and then add the logic for buttons triggers to advance that variable from 0-3 and then reset... the BOUNCE library can help read the button to eliminate chatter on the pin from the switch. You only need to trigger on fallingEdge -- when the button has been pulled low by the switch connecting to ground.

Then work out the LED logic from the current bank setting. You might want help here but if you used ellapsedmillis to limit update rate in the initial part you may be able to work this out you self by the time you get here.

The 'pickup' behaviour could be added anywhere along the way... but it's a bit too complex to outline in a few words so I'll wait to hear if you need help with that.

I'll be happy to help if you get stuck along the way as I'm sure others will too.
 
Thank you so much! It's amazing how much there is to learn to pull out a apparently simple project, it's thanks to members like yourself that the community can become to total newcomers like me. I've just found out a piece of code that I can adapt to my project and I will put more time into learning the functions you mentioned. I'll make sure to come back to the forums when the project gets completed and share what I've learned.

Thanks again!
 
Status
Not open for further replies.
Back
Top