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.