MIDI 4+1: Arduino-powered polyphonic and monophonic MIDI to 4x CV/gate interface in 6HP

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

Moderators: Joe., lisa, luketeaford, Kent

Post Reply
User avatar
joeSeggiola
Common Wiggler
Posts: 178
Joined: Wed Jul 04, 2018 3:59 am
Location: Italy
Contact:

MIDI 4+1: Arduino-powered polyphonic and monophonic MIDI to 4x CV/gate interface in 6HP

Post by joeSeggiola » Sun May 17, 2020 12:03 pm

I made a polyphonic MIDI interface for Eurorack using Arduino and 3D-printing. I was inspired by CVpal and MIDI Thing, but I implemented a feature-set more focused on my needs. It has two different polyphonic allocation modes, and two split-keyboard modes with a monophonic algorithm on one side. I also added an additional "logic OR" gate output (useful for single-filter setups) and the ability to "lock" held voices using a button.

But at the end, the main challenge was building it using only 6HP!

Code and files

https://github.com/joeSeggiola/arduino- ... midi4plus1

Features
  • MIDI DIN input and 4x CV/gate outputs with gate LEDs.
  • Button for cycling through four different modes, with coloured mode LED:
    • Poly (red): four-voices polyphony with priority to last, LRU strategy and voice stealing;
    • Poly-first (orange): four-voices polyphony with priority to first and first-available strategy;
    • Split poly+mono (green): split keyboard with three-voices polyphony on the left, and monophony on the right (priority to last);
    • Split mono+poly (yellow): same as above, but flipped.
  • Additional gate output that stays high while at least one polyphonic voice is active (logic OR), useful for single-filter setups.
  • Voices lock with a long-press of the mode button: all gates of currently held polyphonic voices stay high, ignoring key releases until next reallocation.
Pics of my build
IMG_20200307_181436.jpg
IMG_20200413_181507.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
joeSeggiola
Common Wiggler
Posts: 178
Joined: Wed Jul 04, 2018 3:59 am
Location: Italy
Contact:

Re: MIDI 4+1: Arduino-powered polyphonic and monophonic MIDI to 4x CV/gate interface in 6HP

Post by joeSeggiola » Sun May 24, 2020 10:32 am

Here's a quick demo, where I use the MIDI interface together with my alternative firmware for Stages:



Patch notes, from left to right:

- MIDI 4+1 interface allocates notes polyphonically from the keyboard into four channels of CV/gate. The additional top-most gate output is the combined OR.
- CVs are sent to Chord v2 in Unison Poly Mode: each oscillator is controlled independently by its own 1V/oct input.
- Gates are sent to Stages, which runs a custom firmware (link above) that generates five identical envelopes.
- Veils uses four of these envelopes to drive one VCA for each of the four voices coming from Chord's individual outputs.
- WMD SSF Pole-Zero filters the final mix from Veils; its cutoff is modulated using the fifth envelope from Stages, the one triggered by the OR-gate signal.

User avatar
Neutron7
Oldschool bleeper
Posts: 1946
Joined: Sun May 23, 2010 12:24 pm

Re: MIDI 4+1: Arduino-powered polyphonic and monophonic MIDI to 4x CV/gate interface in 6HP

Post by Neutron7 » Sun May 24, 2020 11:59 am

That is very cool, but living dangerously not having an opto-isolator on MIDI in!

User avatar
joeSeggiola
Common Wiggler
Posts: 178
Joined: Wed Jul 04, 2018 3:59 am
Location: Italy
Contact:

Re: MIDI 4+1: Arduino-powered polyphonic and monophonic MIDI to 4x CV/gate interface in 6HP

Post by joeSeggiola » Sun May 24, 2020 12:49 pm

Neutron7 wrote:
Sun May 24, 2020 11:59 am
That is very cool, but living dangerously not having an opto-isolator on MIDI in!
Thanks for the feedback! Dangerous for the module, the MIDI device, or both? 😅 Can you elaborate?

ixtern
Common Wiggler
Posts: 203
Joined: Mon Jan 22, 2018 4:34 am

Re: MIDI 4+1: Arduino-powered polyphonic and monophonic MIDI to 4x CV/gate interface in 6HP

Post by ixtern » Sun May 24, 2020 2:33 pm

joeSeggiola wrote:
Sun May 24, 2020 12:49 pm
Neutron7 wrote:
Sun May 24, 2020 11:59 am
That is very cool, but living dangerously not having an opto-isolator on MIDI in!
Thanks for the feedback! Dangerous for the module, the MIDI device, or both? 😅 Can you elaborate?
Lack of MIDI IN opto-isolator is not dangerous if you are using devices in home, powered from the same phase.
But on the stage or in the studio, MIDI cables may be very long and you never know from what phase source device is powered and how is secured. That's why opto-isolation for MIDI was introduced.
BTW. Good work with your device. Although this family of DACs (MCP47.., MCP48..) has bad linearity and bad temperature stability. But price is relatively low...

User avatar
joeSeggiola
Common Wiggler
Posts: 178
Joined: Wed Jul 04, 2018 3:59 am
Location: Italy
Contact:

Re: MIDI 4+1: Arduino-powered polyphonic and monophonic MIDI to 4x CV/gate interface in 6HP

Post by joeSeggiola » Sun May 24, 2020 5:34 pm

ixtern wrote:
Sun May 24, 2020 2:33 pm
Lack of MIDI IN opto-isolator is not dangerous if you are using devices in home, powered from the same phase.
But on the stage or in the studio, MIDI cables may be very long and you never know from what phase source device is powered and how is secured. That's why opto-isolation for MIDI was introduced.
Got it, thanks. I've made quick research, I'll try to include a H11L1 or 6N138 in future projects.

ixtern wrote:
Sun May 24, 2020 2:33 pm
BTW. Good work with your device. Although this family of DACs (MCP47.., MCP48..) has bad linearity and bad temperature stability. But price is relatively low...
Yeah, I got five pre-soldered breakout boards with one quadruple DACs (MCP4728) each for about $20 total, I thought they were ok for my first project with CV out, In CV. I didn't experience instability, and I managed to get good results in 4-octaves range using just a linear software compensation (offset and multiplication). Using multi-point calibration could probably make it good for bigger ranges too. What pricier alternatives would you suggest?

ixtern
Common Wiggler
Posts: 203
Joined: Mon Jan 22, 2018 4:34 am

Re: MIDI 4+1: Arduino-powered polyphonic and monophonic MIDI to 4x CV/gate interface in 6HP

Post by ixtern » Mon May 25, 2020 7:12 am

I have two MIDI2CV modules using MCP4822 DACs. Although with big nonlinearity, this issue may be mostly fixed with the calibration table. But I have a problem with their temperature stability. I've observed few mV output voltage drift with the room temperature change (+-5degC). Few mV is too much for me.

So far I have not used better DACs, so I can only suggest by datasheet parameters and prices. DAC8564 (4x16 bit) for the 15$ (Mouser) looks interesting. I have also two pieces of MAX547 (8x13 bit) but I have not tested them yet. For the 35-40$ (Digikey) they are also looks interesting for the polyphonic MIDI2CV as they have lesser nonlinearity errors than MCP... series.

Post Reply

Return to “Music Tech DIY”