I’m building a custom MIDI controller with a Raspberry Pi Pico 2 (CircuitPython) to replicate the behavior of Zynthian’s official 4 physical encoders (Layer, Back, Snapshot, Select) — rotation + push button on each. It connects via USB-MIDI and sends notes on channel 16 (Master Channel), configured through webconf → Interface → MIDI Options → Master Key Actions.
Rather than keep guessing by trial and error, I’d like to know exactly which CUIA and parameter each of the 4 official encoders uses internally, both for rotation (CW/CCW) and for the push button, so I can replicate it precisely. From testing so far, I have:
Could someone confirm whether that Select mapping is correct, and give me the exact CUIA + parameter for Layer, Back, and Snapshot (both rotation directions + push), matching how the official hardware works? I’d like my controller to behave exactly like the factory encoders, not an approximation.
Here’s the note table my Pico sends (channel 16), for reference:
Encoder
Rotate CW
Rotate CCW
Push
Select
Note 100
Note 101
Note 102
Back
Note 103
Note 104
Note 105
Layer
Note 106
Note 107
Note 108
Snapshot
Note 109
Note 110
Note 111
Setup: Zynthian Oram-2601.1, wiring layout TOUCH_ONLY (no physical encoders on the Pi itself).
There are two controllers here both using OSC. A word of caution OSC control doesnt’ ( as far as I know ) exist in the new, new Vangelis trixie combination but I believe it will return… Hopefullt this will give you some insight into how to do this. IT proved incredibly reliable and became my standard interface for zynthian-rack7.local I’ve just pushed this up so please excuse any rough git edges and any wifi passwords visible please drop me a line. I believe I cleared them out but one never knows..
The plan has always been to make these QWERT & MIDI compatable with a setup to choose the mechansism but I was so please with the osc implementation ( Wireless) that I never bothered but it seems a viable and sensbile initiative in the light of Vangelis & V5 as a test of compatability…
But as I say OSC ain’t there at this precise moment…
OSC has not been removed. It remains fully functional. We have changed how OSC accesses individual modules, e.g. the mixer did have direct OSC control but now it is via CUIA.
A regular gotcha is the SELECT CUIA command which is not the SELECT button. This is probably the most regular missunderstanding of CUIA emulation of encoder and switch control. There is a list of CUIA commands in the wiki and this table shows that SELECT takes a parameter to define which element in the current list to lighlight, not select. (@jofemodo we could change that - it confuses a lot of people, including me!)
The CUIA prefixed “ZYN” are the ones you want to look at for emulating the hardware control.
CUIA Name
Parameters
Description
V5_ZYNPOT_SWITCH
%i, %t
Simulates V5 rotary-switch %i action of type %t (Push ,Short, Bold, Long)
Z2_ZYNPOT_TOUCH
%i, %s
Simulates Z2 capacitive touch-switch %i
ZYNPOT
%i, %s
Simulates rotary %i tick of size %s
ZYNSWITCH
%i, %t
Simulates button %i action of type %t (Push, Short, Bold, Long)
ZYN_CC
%i, %i, %i, %i
Send CC to chains. Args: Channel, CC#, Press value, Release value (opt)
As @wyleu eludes to, you may find even better or more configurable integration of a HID USB device than a MIDI device. If I were going down this route, I would consider OSC over UDP (wired or wifi network) or USB HID. There is configuration in webconf INTERFACE->UI Key Binding which allows extensive configuration of keybindings, including modifier keys. You may find some hints here from the default mapping.
For V5 hardware layout, “ZYNSWITCH 24” acts as the first encoder switch with push and release which gives the short, long, bold actions based on the press and release times. There have been some enhancements in vangelis (imminent new stable release candidate) so there may be advice here that is for the later software but most of this has been quite stable since Oram.