Custom MIDI controller with many inputs

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, Joe., luketeaford, lisa

Post Reply
vadimred13
Common Wiggler
Posts: 104
Joined: Thu Mar 03, 2016 2:37 am
Location: Seattle, WA

Custom MIDI controller with many inputs

Post by vadimred13 » Sat Aug 29, 2020 11:26 pm

I'm investigating the feasibility of building a MIDI controller with many pots (~70), but none of the available popular microcontrollers (Arduino, Teensy) have that many analog inputs. Maybe some experienced wigglers can shed some light on a couple of things.

1) Do I actually need that many inputs to make this happen or should I just use multiplexers? I imagine speed becomes an issue here, since all inputs will need to be polled. I'll be using up to 2 of the pots at any given time, but I don't necessarily know which ones. Do I need to come up with a priority system for which pots are more likely to be used together and put them on different inputs?

2) Is it possible to combine, say, several Teensy boards to get more inputs? Is this actually a good idea?

3) Am I completely missing something and going about this the wrong way? Maybe there's a better method.

tele_player
Wiggling with Experience
Posts: 290
Joined: Fri Feb 15, 2019 10:50 am
Location: Sacramento

Re: Custom MIDI controller with many inputs

Post by tele_player » Sun Aug 30, 2020 10:29 am

I think you can do it with one Teensy (3.x or 4.x), and several multiplexers. No prioritization.

MARF clone with extender reads 64 slide pots with a single STM32.

This sounds like a fun project.

User avatar
MikeDB
Common Wiggler
Posts: 182
Joined: Fri Feb 08, 2019 8:28 am
Location: UK

Re: Custom MIDI controller with many inputs

Post by MikeDB » Sun Aug 30, 2020 1:05 pm

You could consider a cheap processor like ATTiny85, a chain of 10 HC595s and 70 diodes from the sliders of each pot to the ADC input on the MCU.
Personally I hate cats ! Set a VCO to about 25kHz with a fairly fast +/- 5kHz frequency modulation into a piezo tweeter and cats will hate you too !

User avatar
cackland
Super Deluxe Wiggler
Posts: 2207
Joined: Thu Dec 28, 2017 5:42 pm
Location: Los Angeles, California

Re: Custom MIDI controller with many inputs

Post by cackland » Sun Aug 30, 2020 5:19 pm

Yes, this can definitely be done with a single MCU and several 16 channel multiplexers. 5 IC's gives you the ability to have 80 inputs.

CD74HC4067 @ around $1 each.
https://au.mouser.com/ProductDetail/Tex ... TZBA%3D%3D

Note: there are even 32 channel multiplexers. However at a significant prices increase.

User avatar
Rex Coil 7
Super Deluxe Wiggler
Posts: 7093
Joined: Thu Nov 29, 2012 11:29 am
Location: Captain Of Outer Space

Re: Custom MIDI controller with many inputs

Post by Rex Coil 7 » Sun Aug 30, 2020 5:33 pm

This ...
LINK = https://analoguehaven.com/doepfer/dial-electronics/

And/or this ... (I have two of these ... nice.)
LINK = https://analoguehaven.com/doepfer/pocket-electronics/

"PE is equipped with MIDI In and MIDI Out. The incoming MIDI messages are merged to the data generated by PE. In this way several PE can be linked together to obtain larger controller arrays with more than 16 elements." (NOTE: I believe you can chain up to four of these, providing 64 elements).

"* The following Midi messages can be generated : any controller, after touch, pitch bend, common RPN resp. NRPN controller, but no SysEx messages

* 128 presets for the assignement of MIDI events to the 16 controlling elements

* The free editor program (PC version) enables the user to program his own 128 presets

* Preset selection via DIP switch or incoming MIDI program change messages "
5U MODULAR NORMALIZING PROJECT (for your entertainment) viewtopic.php?t=78836&highlight=
... I'm dyin' in a vat in the garage ...

tele_player
Wiggling with Experience
Posts: 290
Joined: Fri Feb 15, 2019 10:50 am
Location: Sacramento

Re: Custom MIDI controller with many inputs

Post by tele_player » Sun Aug 30, 2020 7:03 pm

Another Doepfer choice would be the USB64. But it doesn’t quite get to 70.

User avatar
ersatzplanet
Synthwerks Design
Posts: 6717
Joined: Fri Mar 06, 2009 1:18 pm
Location: Seattle WA

Re: Custom MIDI controller with many inputs

Post by ersatzplanet » Sun Aug 30, 2020 10:49 pm

There is this:
Screen Shot 2020-08-30 at 8.46.23 PM.png
Or if you can find one -
Screen Shot 2020-08-30 at 8.47.37 PM.png
You do not have the required permissions to view the files attached to this post.
-James

James Husted - Synthwerks, LLC - www.synthwerks.com - info@synthwerks.com - james@synthwerks.com
Synthwerks is a proud member of the Mostly Modular Trade Association (http://www.mostlymodular.com).
Always looking to trade for Doepfer P6 cases

vadimred13
Common Wiggler
Posts: 104
Joined: Thu Mar 03, 2016 2:37 am
Location: Seattle, WA

Re: Custom MIDI controller with many inputs

Post by vadimred13 » Mon Aug 31, 2020 2:38 am

ersatzplanet wrote:
Sun Aug 30, 2020 10:49 pm
There is this:
Yep, I've got the 60knobs. Great controller! However, I'm really set on a combination of sliding pots and rotary ones, so I'll have to build one. Besides, I'll need at least 70 pots.
cackland wrote:
Sun Aug 30, 2020 5:19 pm
Yes, this can definitely be done with a single MCU and several 16 channel multiplexers. 5 IC's gives you the ability to have 80 inputs.
Will there be any noticeable performance issues (latency) with using multiplexers? Apologies, I'm a bit of a newb.

User avatar
MikeDB
Common Wiggler
Posts: 182
Joined: Fri Feb 08, 2019 8:28 am
Location: UK

Re: Custom MIDI controller with many inputs

Post by MikeDB » Mon Aug 31, 2020 3:17 am

vadimred13 wrote:
Mon Aug 31, 2020 2:38 am
ersatzplanet wrote:
Sun Aug 30, 2020 10:49 pm
There is this:
Yep, I've got the 60knobs. Great controller! However, I'm really set on a combination of sliding pots and rotary ones, so I'll have to build one. Besides, I'll need at least 70 pots.
cackland wrote:
Sun Aug 30, 2020 5:19 pm
Yes, this can definitely be done with a single MCU and several 16 channel multiplexers. 5 IC's gives you the ability to have 80 inputs.
Will there be any noticeable performance issues (latency) with using multiplexers? Apologies, I'm a bit of a newb.
And this is the DIY section so good on you for wanting to build your own. Providing you use a decent processor you won't notice any latency issues. If you read a pot in 10uS which is easy then you'll only take 700uS for the whole lot which I would thought was ok.
Personally I hate cats ! Set a VCO to about 25kHz with a fairly fast +/- 5kHz frequency modulation into a piezo tweeter and cats will hate you too !

User avatar
cackland
Super Deluxe Wiggler
Posts: 2207
Joined: Thu Dec 28, 2017 5:42 pm
Location: Los Angeles, California

Re: Custom MIDI controller with many inputs

Post by cackland » Mon Aug 31, 2020 3:57 am

vadimred13 wrote:
Mon Aug 31, 2020 2:38 am
Will there be any noticeable performance issues (latency) with using multiplexers? Apologies, I'm a bit of a newb.
Not if your implementation is efficient. Usage of interrupts is recommended here.

If you want to go DIY, I would suggest getting a division of the number you intended to use, and test it out. Start slow, get a few, implement, test, trial, retest, repeat.

User avatar
revtor
Dialing it in..
Posts: 1809
Joined: Sat Nov 29, 2008 10:31 am
Location: North Jerz

Re: Custom MIDI controller with many inputs

Post by revtor » Mon Aug 31, 2020 6:42 am

3. A better method is to build up a MidiBox, this sort of thing is just what it was developed for.

MidiBox NG is where to start
http://www.ucapps.de/index.html?page=mi ... l_lcd.html

(Note, MidiBox was developed for non commercial use, so if the 70 pot controller idea will be produced and sold, then the software is off limits.)
Fellow North Jersey Synthaholic

User avatar
ersatzplanet
Synthwerks Design
Posts: 6717
Joined: Fri Mar 06, 2009 1:18 pm
Location: Seattle WA

Re: Custom MIDI controller with many inputs

Post by ersatzplanet » Mon Aug 31, 2020 10:30 am

vadimred13 wrote:
Mon Aug 31, 2020 2:38 am
Will there be any noticeable performance issues (latency) with using multiplexers? Apologies, I'm a bit of a newb.
It all depends on how fast the controls are scanned. they just have to be completely scanned faster than the bandwidth of MIDI which shouldn't be out of the possibility range. Basically every digital synth you every played has most likely had almost all, if not all, front panel knobs scanned.

If you go the route of a intelligent controller with LCD readouts above the knobs, you can use a paged scheme like the Nord G2 which has only 8 knobs on the front panel but has 15 "pages" of control with them.
-James

James Husted - Synthwerks, LLC - www.synthwerks.com - info@synthwerks.com - james@synthwerks.com
Synthwerks is a proud member of the Mostly Modular Trade Association (http://www.mostlymodular.com).
Always looking to trade for Doepfer P6 cases

User avatar
ersatzplanet
Synthwerks Design
Posts: 6717
Joined: Fri Mar 06, 2009 1:18 pm
Location: Seattle WA

Re: Custom MIDI controller with many inputs

Post by ersatzplanet » Mon Aug 31, 2020 10:58 am

If you can live with 64 controllers, there is the Doepfer USB64 with will connect to pots, switches or any resistive elements like FSRs or Vactrols. Not cheap ($230) but very flexible. Basically it is the guts to the unit I posted before. Programmed vis USB from Windows only.
Screen Shot 2020-08-31 at 8.54.18 AM.png
You do not have the required permissions to view the files attached to this post.
-James

James Husted - Synthwerks, LLC - www.synthwerks.com - info@synthwerks.com - james@synthwerks.com
Synthwerks is a proud member of the Mostly Modular Trade Association (http://www.mostlymodular.com).
Always looking to trade for Doepfer P6 cases

User avatar
Rex Coil 7
Super Deluxe Wiggler
Posts: 7093
Joined: Thu Nov 29, 2012 11:29 am
Location: Captain Of Outer Space

Re: Custom MIDI controller with many inputs

Post by Rex Coil 7 » Mon Aug 31, 2020 11:36 am

ersatzplanet wrote:
Mon Aug 31, 2020 10:30 am
vadimred13 wrote:
Mon Aug 31, 2020 2:38 am
Will there be any noticeable performance issues (latency) with using multiplexers? Apologies, I'm a bit of a newb.
It all depends on how fast the controls are scanned. they just have to be completely scanned faster than the bandwidth of MIDI which shouldn't be out of the possibility range. Basically every digital synth you every played has most likely had almost all, if not all, front panel knobs scanned.

If you go the route of a intelligent controller with LCD readouts above the knobs, you can use a paged scheme like the Nord G2 which has only 8 knobs on the front panel but has 15 "pages" of control with them.
Or you can just buy a MIDIFighters "Twister" and a Kenton MIDI USB Host MkII and call the whole thing ~done~. It works for me. Each knob can be set up as a "center = 0" (12 oclock position equals zero) or as full sweep, as well as a number of other functions that each control knob can be assigned to task.

Here's infos on the Kenton MIDI/USB Host MkII

Kenton LINK = https://kentonuk.com/product/midi-usb-host-mkii/

MIDIFighters Twister = 16 rotary encoders ... 16 push buttons ... 16 push-while-turn encoders ("Superknob function") ... and four pages of all of that (so 64 of each function). Easily switched from page to page using buttons on each side of the device. Easily mapped with the free/provided mapping program, and all of your user setups may be saved and loaded (software and computer required for that). With the Kenton no computer is required to use the Twister, and the Kenton also powers the Twister via the USP port.

Before writing it off, at least watch the 13 minute video of how it's programmed and what it is capable of. The worst that can happen is you won't like it. There are many videos of the Twister in use and tricks/tips on it's use. You can buy colored knobs for it if you like and color code each knob or groups of knobs (knobs are specialized and must be purchased separately from the MIDIFighters vendor ... usually DJTech Tools).

5U MODULAR NORMALIZING PROJECT (for your entertainment) viewtopic.php?t=78836&highlight=
... I'm dyin' in a vat in the garage ...

User avatar
ersatzplanet
Synthwerks Design
Posts: 6717
Joined: Fri Mar 06, 2009 1:18 pm
Location: Seattle WA

Re: Custom MIDI controller with many inputs

Post by ersatzplanet » Mon Aug 31, 2020 5:46 pm

Rex Coil 7 wrote:
Mon Aug 31, 2020 11:36 am
Or you can just buy a MIDIFighters "Twister" and a Kenton MIDI USB Host MkII and call the whole thing ~done~. It works for me. Each knob can be set up as a "center = 0" (12 oclock position equals zero) or as full sweep, as well as a number of other functions that each control knob can be assigned to task.
Here's infos on the Kenton MIDI/USB Host MkII
The main difference is the original poster wanted to use custom controls of different types, and seemed to want them all available at once. The USB64 would be perfect for that but of course you would have to make your own chassis to hold it. No host module needed either.

The Twister is a VERY capable box for sure. It has visual feedback and complete programming. Too bad they don't make a version with DIN MIDI or doesn't need the host to run. The color coding makes the paging much easier too. It looks like a perfect MIDI controller though it is a bit pricy by the time you buy the Kenton too. Wanting as many controls as the OP wanted is going to be pricy no matter what solution you come up with.

I used to have a Mackie C4 Controller and it was nice with 32 encoders with push buttons and LED dial feedback and a 2-line LCD strip telling you what every knob did that changed when functions changed. The be problem with it was that it required the DAW to control it and give it the info to display and control. A universal, programmable, stand alone controller with visual feedback and programmable LCD text legends over the knobs would be the perfect thing. Something you could program with a computer, unplug and stand by itself. It would not be cheap though.
-James

James Husted - Synthwerks, LLC - www.synthwerks.com - info@synthwerks.com - james@synthwerks.com
Synthwerks is a proud member of the Mostly Modular Trade Association (http://www.mostlymodular.com).
Always looking to trade for Doepfer P6 cases

User avatar
Rex Coil 7
Super Deluxe Wiggler
Posts: 7093
Joined: Thu Nov 29, 2012 11:29 am
Location: Captain Of Outer Space

Re: Custom MIDI controller with many inputs

Post by Rex Coil 7 » Mon Aug 31, 2020 5:49 pm

It's just an alternative. Sometimes I know that I'll ~think~ I know what I want ... but then someone exposes me to something I'd not considered and I suddenly find I've rethought my appraoch. You never know! :)
5U MODULAR NORMALIZING PROJECT (for your entertainment) viewtopic.php?t=78836&highlight=
... I'm dyin' in a vat in the garage ...

vadimred13
Common Wiggler
Posts: 104
Joined: Thu Mar 03, 2016 2:37 am
Location: Seattle, WA

Re: Custom MIDI controller with many inputs

Post by vadimred13 » Mon Aug 31, 2020 6:07 pm

Rex Coil 7 wrote:
Mon Aug 31, 2020 5:49 pm
It's just an alternative. Sometimes I know that I'll ~think~ I know what I want ... but then someone exposes me to something I'd not considered and I suddenly find I've rethought my appraoch. You never know! :)
I totally get that, and I've had those moments myself. It's one of the reasons I wanted to post here - maybe someone can alter my thinking on this. Your suggestions are much appreciated!

In this case, I very much want sliders, as I haven't found any reasonably sized controllers that have many many sliders. MIDIBox ng looks really cool, but unfortunately I can't find any for sale. I'm ok with doing a little more manual work though. I might be digging myself into a hole, but I like having an excuse to learn something new - in this case, multiplexers.

User avatar
cackland
Super Deluxe Wiggler
Posts: 2207
Joined: Thu Dec 28, 2017 5:42 pm
Location: Los Angeles, California

Re: Custom MIDI controller with many inputs

Post by cackland » Mon Aug 31, 2020 6:08 pm

Rex Coil 7 wrote:
Mon Aug 31, 2020 5:49 pm
It's just an alternative. Sometimes I know that I'll ~think~ I know what I want ... but then someone exposes me to something I'd not considered and I suddenly find I've rethought my appraoch. You never know! :)
Good point, this is true.

If it were me, I'd go DIY. This way the OP understands what is going on, and how to implement any additional features should they choose to in the future.

User avatar
MikeDB
Common Wiggler
Posts: 182
Joined: Fri Feb 08, 2019 8:28 am
Location: UK

Re: Custom MIDI controller with many inputs

Post by MikeDB » Mon Aug 31, 2020 6:32 pm

Using a Daisy which has 8 ADC inputs and lots of GPIOs you can do it without any extra ICs, just a diode connected to the slider of each pot to form a matrix of 9 select lines into 8 ADCs. I'd post a reduced schematic but I can''t see how to do it on this site.
Personally I hate cats ! Set a VCO to about 25kHz with a fairly fast +/- 5kHz frequency modulation into a piezo tweeter and cats will hate you too !

vadimred13
Common Wiggler
Posts: 104
Joined: Thu Mar 03, 2016 2:37 am
Location: Seattle, WA

Re: Custom MIDI controller with many inputs

Post by vadimred13 » Wed Sep 02, 2020 9:15 pm

cackland wrote:
Sun Aug 30, 2020 5:19 pm
Yes, this can definitely be done with a single MCU and several 16 channel multiplexers. 5 IC's gives you the ability to have 80 inputs.

CD74HC4067 @ around $1 each.
https://au.mouser.com/ProductDetail/Tex ... TZBA%3D%3D

Note: there are even 32 channel multiplexers. However at a significant prices increase.
Sweet jesus, why are through hole multiplexers so expensive? Maybe this is this a sign that I need to bite the bullet and learn how to surface mount components.

kallikak
Learning to Wiggle
Posts: 15
Joined: Sat Jun 29, 2019 7:26 pm
Location: Sydney

Re: Custom MIDI controller with many inputs

Post by kallikak » Wed Sep 02, 2020 9:41 pm

You can handle 16 pots with each 74HC4067 - is that really so expensive? I find it's the potentiometer caps that are the most annoying extra cost! :-)

For pots latency isn't a really big issue. It's not like encoders where if you miss the switch then you miss the turn. The pot will give you a correct reading whenever you check it. And generally you only need 7-8 bits of precision. Just make sure it is often enough to be smooth. Averaging helps avoid jitter.

I used a Teensy 4.0 (600MHz - overclock easily to 816MHz) to do my Blofeld controller with 31 pots, 24 encoders and 9 buttons. Didn't even need to use interrupts to handle the encoders.

What I did get wrong was putting the knobs too close to easily turn. So I'm building a new one. :-D
Blofeld.jpg
Ken
You do not have the required permissions to view the files attached to this post.

vadimred13
Common Wiggler
Posts: 104
Joined: Thu Mar 03, 2016 2:37 am
Location: Seattle, WA

Re: Custom MIDI controller with many inputs

Post by vadimred13 » Thu Sep 03, 2020 12:30 am

kallikak wrote:
Wed Sep 02, 2020 9:41 pm
You can handle 16 pots with each 74HC4067 - is that really so expensive? I find it's the potentiometer caps that are the most annoying extra cost! :-)
It's not horrible, but $15 for a through hole vs $1 for a SMT is a bit of a difference, especially when I need 5 of them.

Hey, your controller looks great!

User avatar
Bartimaeus
Veteran Wiggler
Posts: 567
Joined: Sat Jun 22, 2013 4:05 pm
Location: Well that isn't very punk, is it?

Re: Custom MIDI controller with many inputs

Post by Bartimaeus » Thu Sep 03, 2020 12:38 am

vadimred13 wrote:
Thu Sep 03, 2020 12:30 am
kallikak wrote:
Wed Sep 02, 2020 9:41 pm
You can handle 16 pots with each 74HC4067 - is that really so expensive? I find it's the potentiometer caps that are the most annoying extra cost! :-)
It's not horrible, but $15 for a through hole vs $1 for a SMT is a bit of a difference, especially when I need 5 of them.
https://www.ebay.com/itm/5pcs-SOP24-SOI ... SwBUVZz2f3

kallikak
Learning to Wiggle
Posts: 15
Joined: Sat Jun 29, 2019 7:26 pm
Location: Sydney

Re: Custom MIDI controller with many inputs

Post by kallikak » Thu Sep 03, 2020 2:08 am

vadimred13 wrote:
Thu Sep 03, 2020 12:30 am
kallikak wrote:
Wed Sep 02, 2020 9:41 pm
You can handle 16 pots with each 74HC4067 - is that really so expensive? I find it's the potentiometer caps that are the most annoying extra cost! :-)
It's not horrible, but $15 for a through hole vs $1 for a SMT is a bit of a difference, especially when I need 5 of them.

Hey, your controller looks great!
Thanks. It's quite fun to build these things.

Have you considered encoders rather than pots? Then you can use a digital port expander such as the MCP23017 - much cheaper and readily available in through hole. Plus you get the advantage that you don't need to worry about internal values not matching the pot rotation (e.g. after loading a patch or if one controller handles more than one parameter.)

If you need analog though, the 8 bit little brother of the 4067 is a 74HC4051 and they are under $1 in through hole. You'd need twice as many of course, but that's just additional enable lines - and you could put those through another chip if you really needed to save the MCU pins.

For the 16 bit MUX, I at first used the Sparkfun breakout board - around $7 I think (and super cheap at Aliexpress), but recently I have switched to SMT and have them soldered by the fabrication house. JLCPCB are very cheap.

Ken

User avatar
Troubleshooter
Wiggling with Experience
Posts: 374
Joined: Thu Oct 01, 2015 8:21 am
Location: Belgium

Re: Custom MIDI controller with many inputs

Post by Troubleshooter » Thu Sep 03, 2020 3:59 am

I used cheaper 4067's from Ebay on the Traktorino project.They work just fine.
https://www.ebay.nl/itm/10PCS-CD4067BE- ... 2749.l2649

Post Reply

Return to “Music Tech DIY”