Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ottopot, a sophisticated DIY MIDI controller (gerotakke.de)
156 points by rcarmo on Jan 1, 2024 | hide | past | favorite | 30 comments


I found the RP2040 to be great for HID projects like that because of its two cores and PIOs. So you don't have delays because of display/LED updates, and you can delegate some work to the state machines.

If the author is around:

I really enjoy your grease replacement idea and will definitely use that in my projects. Reminds me of the people removing the stops in step encoders.

I was wondering a couple things about your approach:

- do you have noise issues (as in a value oscillating by +/- 1 randomly)

- do you see an issue in precision around your 0/max R positions? they are not exactly contiguous in the pot.

- did you get a measurement of the angle equivalent for a change of 1 in your output value (equivalent of step angle in a step encoder)


I was also thinking about the RP2040 for cost reasons, they are so damn cheap. But I'll go ahead with the Teensy and the PCB first before I'll try something like that.

> - do you have noise issues (as in a value oscillating by +/- 1 randomly)

I've implemented a dead zone logic for this: You have to move the pot a little bit before it “picks up” the movement. I think I've tuned this quite on the safe side and it still feels instant. I'm working on a video demonstration that will hopefully show it. For testing, I was running some automation in Bitwig for an hour and did things like knocking on the table while it ran; if there was any CC message, it would take over the automation so after an hour I would have seen some green indicators to restore automation control.

> - do you see an issue in precision around your 0/max R positions? they are not exactly contiguous in the pot.

No, it feels very smooth. I had some issues with the logic for the points where the directions reversed, but after figuring that out, I can no longer tell where the 0/max positions are.

> - did you get a measurement of the angle equivalent for a change of 1 in your output value (equivalent of step angle in a step encoder)

No; it's analog and there's the deadzone logic so I don't think it is quite as simple as this, but since we're having 4096 values across 360 degrees it would be 0.09 degrees. I do believe that 12bit is actually a bit too much to be reasonable and it is probably more about the timing/bandwidth at this point, not resolution.


Thanks.

You are doing USBMIDI you can use higher rate than normal serial midi, and you can have up to 16 parallel midi ports. Depending on how the tinyusb stack is configured on Teensy it may require tweaking it a little.


You could put both a Raspberry Pi Pico footprint and Teensy footprint on your custom PCB and later decide which one to populate?


Just a PSA here. I'm a huge fan of the RP2040, and use it in a number of products.

Please be aware of the problems with the ADC before assuming it will work for certain applications.

https://www.hackster.io/news/raspberry-pi-confirms-it-is-inv...


Hi, author here! Thanks for sharing this. I'm in the process of making a introduction video for it but it's going to take a while. In the meantime, I uploaded this short snippet for y'all to hopefully demonstrate how smooth and responsive the dials are: https://www.youtube.com/watch?v=PC_YKBjIinc


This is just brilliant. Thanks for sharing!

The question is, where can we buy one? Or even better, where can we buy one with 16 knobs to replace my MidiFighter Twister? :-)


Looks a lot like the MIDI Fighter Twister, which is a great device, even if a tad expensive.

I use the Fighter Twister to play vintage synth simulations and was considering ripping it apart and place the encoders on a custom made front plate that resembles the old gear. It'd be only a stopgap, because I'd need a lot of different versions. A natural extension of this idea would be something like the Ottopot but with rearrangeable encoders, like on mechanical keyboards with exchangeable switches. Then add custom front plates and you'd almost be there.


One note on the Twister is that it does have source code available. I've never looked into it too deeply (instead I ended up using the knobs in enc/dec mode on stock firmware to do full takeover): https://github.com/DJ-TechTools/Midi_Fighter_Twister_Open_So...


Yes, it actually replaces the MIDI Fighter Twister on my desk :-)


This looks great. If only I had the time and the skill to build something like that!

If anyone is looking for an even smaller (non-DIY) MIDI controller, Monogram and Intech offer really great options: modular, snappable desktop devices.

For a long time it puzzled me how few small controllers existed on the market, with the only ones I could find being DIY. Personally, I rarely need more than 1-2 knobs/faders.


Cool! But I would’ve preferred sliders over dials. Or a combination of the two. Sliders are particularly useful when controlling multiple parameters in real time performance, where dials basically make that impossible. It’s quite normal for example to have two fingers on two sliders while performing with orchestral virtual instruments, while the other hand is on a keyboard.


Author here, thanks! The issue with sliders is that either you'll have to use a “latch takeover mode” or use motorized sliders if the parameters change in the software. With these, the LEDs and internal values just update when something changes, so like a motor fader but much less involved and cheaper. I do agree that sliders better control but these dials with LED indicators feel like a better “general purpose” controller to me.


Hey there, very nice project!

A couple of bits: 'course' -> 'coarse' and the reason you don't get the same feel from digital is simply because of the digitization itself, if the steps are large then there is always some movement that isn't enough for a whole step, rather than that it doesn't max out the full range.

Looking forward to more of your posts.


Thank you! Fixed that typo.


Have you come across any high resolution sliders that you can recommend? Either motorized or not, or a brand in general you like?


Go with original replacement sliders from good mixer boards. They will usually be much much better and easier to select than any out of electronic vendor ones. They are really costly but the difference in behavior, feeling and reliability is worth the cost if you need precision.

I've had good success with Numark salvaged ones, but I'm sure there is better.


Your post made me recall of a technique I saw on a mixing book some 30+ years ago. The trick consisted in linking together two or more potentiometer knobs on a mixer by using thick rubber bands, so that one could rotate more than one with a single hand, for example to alter a filter while acting on a fx send, etc. By wrapping the rubber band in inverted position on one knob one could also for example pan a sound to left while another one went to the right, etc. This was of course well before automation became widespread. Unfortunately I lent that book to some friend to never get it back, and don't even recall which friend was or the book title.


Now I'm imagining a Rube Goldberg device with all sorts of rubber bands, weights and hatches hanging piecemeal over a mixing desk and a desperate audio engineer lacking the gyral fortitude to find the crossover sweet spot on the EQ.


Monogram has a 3 slider controller, plus it's modular so you can build something for your specific workflow.


Thanks for sharing this.

There are two main reasons I know people behind the use acceleration for pots in midi controllers:

- increase reactivity (small quick movement to cut frequencies faster for example)

- low resolution of encoders (mostly for step ones) that do not cover the full range (especially 14bits) in a turn or 3/4 of a turn


I’d love to make a midi controller for my alpha juno and tx81z with a screen for the envelopes. Like a generic controller with say 12 pots and some switches to change operators/pages. I come from a software background not an electronics background so I find it difficult to find info about where to go with this idea. Would building this be a good stepping stone? Does anyone know any good sites for info on this?

Ultimately I’d love to put that dx7 that’s on a raspberry pi but put it in the format of the digitone. I loved everything about the digitone but the sound.


I also have a software background and have been learning hardware design recently for a midi controller project of my own.

For the project you describe, you probably don't need more than a basic understanding of electricity. You'll want a microcontroller. I like the Teensy, as it has good libraries and many people have used it for midi-related projects.

You'll probably also want to design a proper PCB. You wouldn't have to, but once you know how to do it, it opens up a lot of possibilities. Kicad is great, once you get the hang of it. The learning curve is steep. There are a lot of good videos on youtube though.

I've been using JLCPCB for boards, and mostly Tayda for through-hole parts. JLCPCB's minimum order is five boards, and if you aren't doing anything fancy it's usually super cheap.

Boards can be either be all through-hole or you could have some surface mount. Surface mount is great for mass production, as you can order the boards with the surface mount components already placed, and it's cheap.


As much as I'd like more people to build it, I don't think it's a good match for your situation. Both things that make the ottopot special (and thus a bit more involved and expensive) won't work with hardware synthesizers as far as I'm aware; 14bit CCs and MIDI feedback for updating the LEDs. I think your best way forward would be to buy something like an Arduino starter kit with a handful of components and a breadboard and just start following some examples from arduino.cc — probably using USB MIDI at first because it doesn't require any additional components with modern microcontrollers. From there it's easy to go to DIN MIDI. Overall I've found MIDI projects a very good entry into the world of electronics and microcontrollers because it's really simple and even the smallest projects can have immediate, motivating results.


You might be able to combine a small physical MIDI controller with a cheap phone/tablet for controlling more advanced features like envelopes.


Really excellent work on this.

I also like the RP2040 (even with the ADC issues; you can always use an IC if it's really an issue) but regardless of what mcu you're using, one thing I strongly recommend as you progress in your PCB design journey is that you skip the off-the-shelf board and implement your own mcu on the same board as the rest of your components.

The amount you'll learn and the flexibility you'll gain from not having to think about the limitations of commercial boards is dramatic. At the end of the day, all I need to get an RP2040 working is an LDO, some flash memory, a 12Mhz crystal and some decoupling capacitors. I recommend looking at the PCB designs that Adafruit publishes for inspiration, eg. https://learn.adafruit.com/adafruit-qt-py-2040/downloads

For me, there's a very real liberation in not having to worry if I can get enough mcu boards in time.

I am genuinely intrigued by the 14bit CC scheme you mentioned. I accept at face value that 128 steps might not be enough when you have such a smooth pot to work with, even though I admit that it's always felt fine to me. I might just be a hack musician. :)

That said, I really wonder if and how it can be as simple as sending two values in rapid succession. MIDI messages can and do get lost or dropped due to congestion. So, how does it know which one comes first or second? Or are they sent on different CC numbers? Is there some kind of shadow spec which defines this, in terms of timeouts etc?

One thing that you'll find when you move to a PCB is that the connections will be much better, and the amount of noise and oscillating values will drop significantly. I've tried to implement "dead zone" schemes for projects in the past as you describe; I found that the longer I used the device, the closer I'd get to a 100% chance of a false positive, even at values which seem impossible. So I'd bump up the gate value and suddenly it takes a lot more movement than I'd planned on day one before the values start to move.

You can lose a lot of time chasing your tail on things like that.

Doing this stuff will really make you gain respect for the hours people spent designing devices like the OP-1, with its knobs and buttons that never bounce and only feel bounded by your manual dexterity.


Love this! Naive question: what kind of resolution do potentiometers like these provide? I took a look at the specs but I don't know how to interpret them. I'm curious why you would or wouldn't use high res rotary optical encoders (aside from $).


Since the potentiometers are analog, they are advertising it as “theoretically infinite”. I stumbled upon these endless pots by chance after looking at options to do something like this for years. I have experimented with optical mice sensors, thought about hall effect sensors and IMUs. These pots do everything I wished for. Like I said in another comment, I think it's at a point where timing/MIDI bandwidth is factoring in more than the resolution. And yeah, the reason why I never picked up a higher resolution encoder was just the price.


Depends how high-res, but some encoders have several million steps per rotation (up to 25 bits for that brand): https://www.gurley.com/rotary-motion

(I don't know the prices of those probably several thousands a piece?)


They usually use two 90 degree offset optical patterns encoded in glass, depending on how they work they may be all digital, analog or a mixture of both to interpolate between the digital steps.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: