Eurorack Zynthian (Pi 4B/Pisound + cv, gate, mod)

I started building a Zynthian eurorack module, using my available Raspberry Pi 4B, Blokas Pisound, and a Waveshare 4.3in touch screen.

I plan to control it with:

  • 4 encoders with click
  • 4x4 Neotrelis pads
  • a thumb joystick (basically 2 pots + button) which could be better for editing sequences.

For in-out on the front panel I want:

  • midi in/out, audio in/out L/R (will connect those to Pisound)
  • usb-c for power and 3 usb mother ports exposed (connected to RPi)
  • 2 sets of cv/mod 1/mod2/gate in (so 8 jacks, will only use Zynthian as a sound source, not as a sequencer or modulator, so won’t need the cv/outs).

Planning to use a Teensy 4.1 to connect all of these.

Now, the question is:

  • what’s the best way to connect this to the Zynthian box? Midi via Pi Usb? Midi analog via Pisound? i2c via Pi? Unfortunately the Pisound only leaves few GPIO pins available to connect so cannot use the GPIO connecting methods that I’ve seen mentioned in the forum.
  • should I program this as a controller with generic Midi messages, then do the configuration/mapping in Zynthian prefs, or should I program it directly with specific Zynthian messages?

Happy to share the progress and code (not started it). I am a beginner Arduino programmer but there are a lot of examples I am copy pasting from, first experiments with a basic controller worked. And there’s the Arduino midi library which makes it even easier.

Any ideas/thoughts are welcome! :pray:t2:

1 Like

I would strongly advocate connecting via USB in this regard. It provides a controllable and nameable port that would interface well with the zynthian device controls . .

If latency or performance of message passing becomes an issue you can elevate your self to I2c if you wish, but you are developing a whole different level of interface there and you would benefit massively from all the kit you develop over MIDI or QWERTY, with easy debugging.

The GPIO pins, on a Pi, whilst used in the original zynthian are functionally, largely, bypassed. Interconnections into the system are presented via the developing API. So CUIA commands can be passed as MIDI messages or QWERTY ( that’s how to distinguish keyboards… @riban) from your device. And if you don’t require any kind of return such as a light coming on, then that will work well, and far more importantly, be easily testable if things ain’t working right. You are developing a grammar for your device within an existing framework, so you are saved the tedium of start, stop an message length handling. Which is really appreciated as the nights draw in and the bits don’t talk.

The nice thing about a USB Device you define is you can name it something relevant that will show up in lsusb firstly.
Which moves onto the second decision to make. IF you choose QWERTY then simple USB driver will work for you but if you are working with MIDI over USB, this isn’t a fascility that’s offered so there is a certain amount of Microcontroller gymnastics required to add a USB MIDI presentation. There is some discussion here.

But I’ve done since With a combined USB library under Maple that works on a Blue Pill, but haven’t pushed up the code cos it’s in a state of flux, with Power supply stuff.

And that raises the most important aspect of all this. THE POWER SUPPLY!

How are you going to power it reliably and how much excess current might you allow for possible device plugged into the very popular USB connectors on a Pi?

I’ve built a few zynths in all kinds of funny boxes and frankly I’ve spent far more time dealing with power supplies than anything else. I do have a certain obsession with Battery power but the points still stands. How are you going to handle powering up and powering down your zynth within it’s Eurorack home?

Here for instance is the back of my 19 inch rack.

.

If the pi is going somewhere make sure its easy to get to the ssd… Once you’ve dissembled it six times you may regret all those screws you added…

And can you place the pi in the system so connectors are visible to the outside world. It’s amazing how much space extending an hdmi or a USB takes up.

1 Like

Thanks! Very good points. A few thoughts:

  • will use Midi CC/messages. Although the keyboard approach is easier (for the Neopixel pads at least), I need Midi for sending the CV or joystick values. While doing both Midi & keyboard could work, it will be messier to configure
  • the Pi will be powered by external 100W USB adaptor brick (can’t afford it sucking all my Eurorack power).
  • the controller will be using a Teensy, which uses 100mA. I could power it via the eurorack board but it makes no sense as it should not be a nuissance for the Pi power over usb.
  • I won’t be using more than 1 external usb device but thought of exposing all 3 remaining Pi’s ports in case I need to attach a keyboard or mouse for config stuff.
  • I got an Adafruit ribbon extender for the SD card… but it’s crap, won’t work. Good point though… now I need to remove the DSI screen connector to access the SD card.
  • not sure of whether to develop this as a generic usb controller, then map it to zynthian… or program it directly with controller drivers in mind.

Anyway, it’s an exciting project, my only frustration is that it will progress slow because of my work schedule and commitments.

It’s amazing how much you can get done using a Wireless USB Mouse and a Wireless QWERTY on a zynthian.

The touchscreen test is the naming of snapshots in @riban 's excellent on screen keyboard. Can you actually give something a new name?. Mind you I like 7" touchscreens.
If you put the encoders on the device you are defining it as a zynthian peripheral so that sort of, in our peculiar open source world, means you are expecting there to be one around, but that not to stop you making the functionality as basic as you can. So,perhaps, make it as dumb as it needs to be in MID world, but recognize as much of it’s characteristics as you can in the device driver, and provide the visual feedback that way.
You will be wagging both the tail and the dog in this sort of situation, but as this is a nacent area of zynthian development from the user perspective, you are in an excellent position to see what works and discover the limitations and advantages.

1 Like

I also like 7" minimum screen size. The v5 device is usable, but I’d be much happier with a 7" version. :>