Difference between revisions of "Supported plug & play MIDI controllers"

From ZynthianWiki
Jump to navigation Jump to search
m (Move the remaining devices out to separate pages)
 
(146 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Zynthian can be connected to almost any existing MIDI device and you can use the MIDI learning mechanism, as described in the [[Zynthian_UI_User_Guide_-_V1/V4|UI user's guide]], to assign parameters to faders and knobs in your MIDI controller, for instance. You could also assign pad trigger to notes, etc. But MIDI learning process takes time, it's limiting and you can't get feedback easily. Sometimes it's a lot better to plug a well-known (supported) MIDI controller and get everything mapped automatically. For having this, zynthian implements a controller driver API that allows developers to create specific drivers for specific devices.  
+
==Introduction==
 +
Zynthian can be connected to almost any existing MIDI device and you can use the MIDI learning mechanism, as described in the [[Zynthian_UI_User_Guide_-_V1/V4|UI user's guide]], to assign parameters to faders and knobs in your MIDI controller, for instance. You could also assign pad trigger to notes, etc. But MIDI learning process takes time, it's limiting and you can't get feedback easily. Sometimes it's a lot better to plug a well-known (supported) MIDI controller and get everything mapped automatically. For having this, Zynthian implements a controller driver API that allows developers to create specific drivers for specific devices.
  
This section contain documentation for some of this controller drivers.
+
===Supported Drivers and Guides===
 +
* After expanding greatly, the driver page has been split into multiple pages according to similar devices. See [[#Driver Pages|'''Driver Pages''']] for a categorised list of device driver pages.
 +
* There is also a [[#Table of Device Features|'''sortable table of devices''']] to get a glance of what devices have drivers and what functions are available for them. Click the title link to go to the device driver page.
 +
* As with the rest of the wiki, some information here may be slightly out of date, there may be devices available that aren't shown here. For more up to date info on driver development, see the forum. For a list of drivers currently integrated into Zynthian you can check [https://github.com/zynthian/zynthian-ui/tree/vangelis/zyngine/ctrldev the (Vangelis version) list on github].
  
{{NoteBox|This documentation is valid for the "chain_manager" development branch. It's only partially valid for the current testing branch so you could find some differences.}}
+
===Accessing Drivers in Zynthian===
 +
As the title hints, if you connect your device (via USB), Zynthian will automatically load the driver if a compatible one exists. Where there are multiple drivers for a given device (or to use a generic driver such as Mackie Control, the active driver mode can be selected from within the '''Midi Input Devices''' menu from the Chain Manager screen or the individual chain options screen (also the admin menu). '''Bold press''' the driver entry for further options.
  
 +
===Driver Functions===
 +
This section contains documentation for some of these controller drivers. There are two core driver functions which control the primary screens in the Zynthian UI:
 +
* '''Launcher mode (Zynpad)''': Launch patterns in the launcher grid interface (as with DAWs like Ableton or Logic)
 +
* '''Mixer mode (ZynMixer)''': Control chain levels, mutes and solo. Different devices may have some additional controls and functions.
 +
There are also additional driver modes/functions depending on the device and driver:
 +
* '''UI Navigation''': Adds some degree of UI navigation control via arrow buttons or by emulating encoders & buttons on the device
 +
* '''SuperLooper Mode''': Provides an interface to the native SuperLooper UI within Zynthian for looping live performance.
 +
* '''Sequencer Mode (ZynSeq)''': (Sequencer functionality for the device depends on the Zynthian version installed) Provides some degree of control over the sequencer or pattern editor.
 +
* '''Moder Mode''': Adjusts device note inputs to stay in scale or provides some chord functionality
 
<br clear=all>
 
<br clear=all>
 +
==Driver Pages==
 +
* [[Akai APC Series]]
 +
* [[Akai MIDI MIX]]
 +
* [[Akai MPK Series]]
 +
* [[Arturia Keylab Series]]
 +
* [[Novation Launchpad Series]]
 +
* [[Novation Launchkey Series]]
 +
* [[Behringer MOTÖR 61 / 49]]
 +
* [[Korg nanoKONTROL Series]]
 +
* [[Fostex Mixtab]]
 +
* [[Mackie Control]]
 +
* [[Teenage Engineering OP-1]]
 +
* [[SooperLooper CCx10, for Behringer FCB1010 & others]]
 +
* [[Worlde Mini Moder Driver]]
 +
* [[Sinco smk25]]
  
==Akai APC Key25 MK2==
+
==Table of Device Features==
 +
{| class="wikitable sortable" style="text-align:center;"
 +
|- style="font-weight:bold;"
 +
! style="vertical-align:middle;" | Device
 +
! style="vertical-align:middle;" | Launcher mode (ZynPad)
 +
! style="vertical-align:middle;" | Mixer mode (ZynMixer)
 +
! UI Navigation
 +
! style="vertical-align:middle;" | SuperLooper mode
 +
! style="vertical-align:middle;" | Sequencer mode (ZynSeq)
 +
! style="text-align:left;" | Moder (chords/scales)
 +
! style="vertical-align:middle;" | Extra features / notes
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Akai APC Series|Akai APC Key25 MK2]][[File:Akai_apc_key25_mk2.png|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Mixpad (default) controls Mixer + ZynPad; also Step Sequencer / pattern editor; Device mode controls the Zynthian UI.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Akai APC Series|Akai APC Key25 MK2 + SL]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Adds SooperLooper looper controls + Levels/Pan/Sync&Quantize/Session save+load; base modes otherwise match the non-SL driver.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Akai MIDI MIX]][[File:Akai-midi-mix.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Maps mixer functionality (chains 1–16 via banks, master slider, balance, mute/solo, rec-arm).
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Akai MPK Series|Akai MPK mini MK3]][[File:Akai-mpk-mini-top.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Modes: Mixer (default), Device UI, Pattern (ZynPad + Pattern Editor), NotePad; plus User and Config modes.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Akai MPK Series|Akai MPK mini MK3 Moder]]
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="vertical-align:middle; text-align:left;" | This is a very simple "Mode Enforcer" driver for the Akai MPK mini MK3.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Novation Launchpad Series|Novation LAUNCHPAD MINI MK1]][[File:Novation_launchpad_mini_mk1_zynpad.png|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | ZynPad driver.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Novation Launchpad Series| Novation LAUNCHPAD MINI MK3]][[File:Novation_launchpad_mini_mk3_zynpad.png|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | ZynPad driver.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Novation Launchpad Series| Novation LAUNCHPAD PRO MK2]][[File:Novation_launchpad_pro_mk2_zynpad.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Three modes using the top row buttons:
 +
* Launcher - similar function to Ableton Live
 +
* Mixer - volume, pan and (needs testing) sends
 +
* Device Control - emulates the 20 button array of the V5 and encoder buttons
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Novation Launchpad Series| Novation LAUNCHPAD PRO MK3]][[File:Novation_launchpad_pro_mk3_zynpad.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | ZynPad driver.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Novation Launchpad Series| Novation LAUNCHPAD X]][[File:Akai-mpk-mini-top.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | ZynPad driver.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Novation Launchkey Series| Novation LAUNCHKEY MINI MK3]][[File:Launchkey_mini_mk3.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Mixer + ZynPad.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Novation Launchkey Series| Novation LAUNCHKEY 88 MK3]][[File:Launchkey_88_mk3.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Mixer + ZynPad.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Behringer MOTÖR 61 / 49]][[File:Behringer_motor.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | This driver is focused in stage control of setBfree and Pianoteq engines. It also includes the mode enforcer that can be controlled from the pads (notes).
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Korg nanoKONTROL Series|Korg nanoKONTROL]][[File:NanoKONTROL1.png|150px|left]]
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Not currently available.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Korg nanoKONTROL Series|Korg nanoKONTROL-2]][[File:NanoKONTROL2.png|150px|left]]
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | ZynMixer driver with UI navigation.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Mackie Control]][[File:Mackie_control.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | This driver can be loaded for devices that support MCU protocol and variants.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Fostex Mixtab]][[File:Mixtab.png|150px|left]]
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | This driver maps the hardware controls to relevant parameters in zynthian (mostly zynmixer).
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[Teenage Engineering OP-1]][[File:Te-op1.jpg|150px|left]]
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | Encoder control of parameters and UI navigation via encoders and buttons.
 +
|-
 +
| style="vertical-align:middle; text-align:left;" | [[SooperLooper CCx10, for Behringer FCB1010 & others]][[File:Fcb1010.jpeg|150px|left]]
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="vertical-align:middle; background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="vertical-align:middle; text-align:left;" | SooperLooper CCx10 controller support.
 +
|-
 +
| style="text-align:left;" | [[Worlde Mini Moder Driver]]
 +
[[File:Worlde mini.png|150px|left|Worlde mini midi keyboard]]
 +
| style="background-color:#ffce93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="text-align:left;" |
 +
|-
 +
| style="text-align:left;" | [[Akai MPK Series|Akai MPK249]][[File:Akai mpk249.webp|Akai mpk249|150px|left]]
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="text-align:left;" |
 +
|-
 +
| style="text-align:left;" | [[Novation Launchkey Series|Launchkey Mini Mk4 37]][[File:LaunchKeyM37-MKIV.jpg|150px|left|Launchkey Mini Mk4]]
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="text-align:left;" |
 +
|-
 +
| style="text-align:left;" | [[Launchkey Mini Mk3]][[File:LaunchkeyMiniMk3.jpg|150px|left|Launchkey Mini Mk3]]
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="text-align:left;" |
 +
|-
 +
| style="text-align:left;" | [[Novation Launchkey Series|Launchkey Mk3 88]][[File:Launchkey88.jpg|150px|left|Launchkey88]]
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="text-align:left;" |
 +
|-
 +
| style="text-align:left;" | [[Novation Launchkey Series|Launchkey Mk4 37]][[File:Launchkey37-MKIV.jpg|150px|left|Launchkey37-MKIV]]
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="text-align:left;" |
 +
|-
 +
| style="text-align:left;" | [[Sinco smk25]]
 +
[[File:Simco smk25.webp|150px|left|Simco smk25]]
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="text-align:left;" |
 +
|-
 +
| style="text-align:left;" | [[Arturia Keylab Series|Arturia Keylab Mk2 61]]
 +
[[File:Arturia keylab mk2 61.jpg|150px|left|Arturia keylab mk2 61]]
 +
| style="background-color:#C8E6C9;" | yes
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#FFCE93;" | tbc
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="background-color:#F8D7DA;" | no
 +
| style="text-align:left;" |
 +
|}
  
This device supports two operation modes (and a third is in progress):
+
<br clear=all>
  
* The '''"Mixpad"''' mode (default), which controls the Zynthian's Mixer and ZynPad.
 
* The '''"Device"''' mode, which handles the Zynthian UI.
 
* The '''"Sequencer"''' mode, which handles the Zynthian Step Sequencer.
 
  
====The Mixpad mode====
 
  
[[File:akai_apc_key25_mk2.png|800px|right]]
 
  
This is the default mode, selected automatically on start. You can also change to it pressing <code>SHIFT</code> + <code>VOLUME</code> or <code>SHIFT</code> + <code>PAN</code>. In this mode you can perform the following actions:
 
  
* Tap a pad to '''start/stop a sequence'''. The pad LED will show its status as follows (pad color will always match the sequence color):
 
** Dim solid: Stopped sequence without content (no notes in patterns).
 
** Bright solid: Stopped sequence with content.
 
** Blinking slow: Playing sequence.
 
** Blinking fast: Recording sequence.
 
** Pulsing: Syncing to play/stop.
 
  
* Change controller's bank. There are '''two banks''' (1 and 2), which are used to handle up to 16 chains (with the eight track buttons/knobs). Bank 1 is for chains 1 to 8 and bank 2 manage chains 9 to 16. To show current selected bank, press and hold <code>SHIFT</code>. One of the track buttons <code>LEFT arrow</code> or <code>RIGHT arrow</code> will light up in red, <code>LEFT arrow</code> is bank 1 and <code>RIGHT arrow</code> is bank 2. You can press one of these buttons while holding <code>SHIFT</code> to change the bank.
 
  
* Use track buttons to '''perform a function''' on chains. The function is chosen by pressing <code>SHIFT</code> + one of <code>SELECT</code>, <code>MUTE</code> or <code>SOLO</code> soft key buttons. Press and hold <code>SHIFT</code> to see current selected function on soft key buttons (in green). Functions are:
+
==Technical Info For Driver Developers==
** <code>SELECT</code>, used to change the selected chain. The key bed (black and white keys) will play on that chain.
 
** <code>MUTE</code>, used to mute the corresponding chain.
 
** <code>SOLO</code>, used to enable solo in the corresponding chain.
 
  
* '''Mute main chain''', pressing <code>SHIFT</code> + <code>PLAY</code>.
+
Drivers are python modules implementing a class. This class can call internal zynthian-ui API, so it has full access to Zynthian functionality. It’s not limited by CUIA. No limits, so you can break the UI too 😉
  
* '''Change current scene''' using the track buttons. You need first to select that function by pressing <code>SHIFT</code> + <code>REC ARM</code> button. This function is affected by bank selection, so you can change up to 16 scenes. When selecting a new scene, the ZynPad will be shown.
+
<blockquote>'''NOTE:''' the name of the class should be identical to that of the file name. This is a common pitfall when developing new drivers.</blockquote>
  
* Start/stop '''sequences of a row''', pressing the corresponding SOFT KEY (without modifiers). If there are any sequence playing, they will stop. If there are no sequences playing, it will start those not empty. The action to be run is shown by the LED status (lit will stop, off will start).
+
<code>dev_ids</code> is a list of identifiers that the driver will match. You can find this by looking at the name of the device in the MIDI Input view in Zynthian. If you bold press the corresponding input to see its options menu, the "Rename port" option shows its USB port / MIDI input name. Use the MIDI input name for your <code>dev_ids</code> list, e.g. Rename port 'USB:2.2/Launchkey Mini MK3 In 2' would provide the device id: "Launchkey Mini MK3 In 2".
  
* Use knobs to modify '''chains' volume or balance'''. The function is given by current KNOB CTRL selected: <code>VOLUME</code> or <code>PAN</code> (for balance). To change the function, press <code>SHIFT</code> + <code>VOLUME</code> or <code>SHIFT</code> + <code>PAN</code>. The knobs are also affected by current controller's bank.
+
You can check the full code here:
  
* Use <code>SHIFT</code> + <code>KNOB k1</code> to change volume or balance for main chain (what changes is selected by the current KNOB CTRL function).
+
[https://github.com/zynthian/zynthian-ui/blob/oram/zyngine/zynthian_ctrldev_manager.py zynthian-ui/zyngui/zynthian_ctrldev_manager.py zynthian/zyngine · GitHub]
  
* Press <code>SHIFT</code> + <code>STOP ALL CLIPS</code> for a ''''panic' stop''', which stops all sequences, audio and midi playback.
+
and some example drivers here:
  
* '''Toggle audio playback''' with <code>PLAY/PAUSE</code> button. If Zynthian's ALT mode is active, it will '''toggle MIDI playback'''.
+
[https://github.com/zynthian/zynthian-ui/tree/oram/zyngine/ctrldev zynthian-ui/zyngine/ctrldev/ · GitHub]
  
* '''Toggle audio record''' with <code>SHIFT</code> + <code>RECORD</code> button. If Zynthian's ALT mode is active, it will '''toggle MIDI recording'''.
+
All drivers must inherit from ''zynthian_ctrldev_base'', implementing the needed functionality as commented in the base code:
  
* '''Stop all sequences''' of current scene (but not audio/midi playback or recording), doing a ''short'' press on <code>STOP ALL CLIPS</code> button; ''bold'' press to stop all sequences on all scenes.
+
<pre>
  
* Open the '''StepSeq mode''' for a given sequence, pressing <code>SHIFT</code> + a pad button.
+
#------------------------------------------------------------------------------------------------------------------
 +
# Control device base class
 +
#------------------------------------------------------------------------------------------------------------------
  
* '''Clear a sequence''', pressing any track button + the sequence pad.
+
class zynthian_ctrldev_base():
  
* Start '''recording a pattern'''. For this, press <code>RECORD</code> + a pad button, which will 1) select the chain associated with the group of the sequence, 2) open the pattern editor for that sequence, 3) start playing the sequence and 4) start recording that sequence. If you press the pad again (without holding any other button), the recording will stop. Press again to stop playback too. You can also control the playback/recording with <code>PLAY/PAUSE</code> and <code>SHIFT</code> + <code>RECORD</code> buttons.
+
dev_id = None  # String that identifies the device (class variable!)
 +
dev_zynpad = False # Can act as a zynpad trigger device
 +
dev_zynmixer = False # Can act as an audio mixer controller device
 +
dev_pated = False # Can act as a pattern editor device
  
* If the pattern editor is open, press <code>SHIFT</code> + <code>UP arrow</code> to '''go back to ZynPad'''. Press it again to go to mixer screen.
 
  
* '''Open the ZynPad''' pressing <code>SHIFT</code> + <code>DOWN arrow</code>.
+
# Function to initialise class
 +
def __init__(self):
 +
self.idev = 0 # Slot index where the device is connected, starting from 1 (0 = None)
 +
self.zyngui = zynthian_gui_config.zyngui
  
* Open the '''sequence manager''' (also known as the ''Seqman'' sub-mode), pressing <code>SHIFT</code> + <code>CLIP STOP</code>. If this mode is active, the LED of the <code>CLIP STOP</code> button will blink in green, and one of <code>VOLUME</code>, <code>PAN</code> or <code>SEND</code> buttons will also be solid in red, each one related to a specific function:
 
** <code>VOLUME</code>: this is COPY mode. Press the pad of a non-empty sequence to mark it as source (it will blink fast). Press another pad to copy the selected source to it. Press the selected source pad to clear selection.
 
** <code>PAN</code>: this is MOVE mode. It works like COPY mode, but also removes the source sequence.
 
** <code>SEND</code>: this is CLEAR mode. It will remove any notes on first pattern of sequence when its pad is pressed.
 
** Use <code>LEFT</code> and <code>RIGHT</code> arrows to move from one scene to another. You can also copy/move patterns between scenes.
 
** Press <code>SHIFT</code> + <code>SELECT</code> to exit this sub-mode.
 
  
====The Device mode====
+
# Setup the device connected in slot #idev
 +
# Before calling this, the caller (ctrldev-manager) should check that driver's ID string matches device's ID string
 +
def setup(self, idev=None):
 +
if idev != self.idev:
 +
# Release currently selected device, if any ...
 +
self.release()
 +
# Init new selected device
 +
if idev > 0:
 +
self.idev = idev
 +
logging.info("Setting-up {} in slot {}".format(self.dev_id, self.idev))
 +
# Setup routing
 +
lib_zyncore.zmip_set_route_extdev(self.idev - 1, 0)
 +
zynautoconnect.midi_autoconnect(True)
 +
# Initialize new selected device
 +
self.init()
 +
self.refresh(force=True)
  
[[File:Akai-apc-key-25-mk2-ui-legend.png|800px|right]]
 
  
This mode allows you to '''control the Zynthian UI'''. You can enable it by pressing <code>SHIFT</code> + <code>DEVICE</code>. If this mode is active, the button <code>DEVICE</code> will blink in red.
+
def release(self):
 +
if self.idev > 0:
 +
logging.info("Releasing {} in slot {}".format(self.dev_id, self.idev))
 +
# If device is still connected, call end
 +
dev_id = zynautoconnect.get_midi_device_name(self.idev)
 +
if dev_id and dev_id == self.dev_id:
 +
self.end()
 +
# Restore routing
 +
lib_zyncore.zmip_set_route_extdev(self.idev - 1, 1)
 +
zynautoconnect.midi_autoconnect(True)
 +
self.idev = 0
  
As you can see in the image, this mode mimics the Zynthian V5 hardware interface. The upper four buttons are <code>OPT/ADMIN</code>, <code>MIX/LEVEL</code>, <code>CTRL/PRESET</code> and <code>ZS3/SHOT</code>. Next row is <code>ALT</code>, <code>METRONOME</code> and <code>PAD/STEP</code>. The four buttons at the right side (in white) are <code>F1</code> to <code>F4</code>. In this mode, transport is handled by <code>PLAY/PAUSE</code> and <code>RECORD</code> buttons, and the transport pads are only to show playback/recording status. Navigation buttons are <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code>, (in yellow) <code>BACK/NO</code> (in red) and <code>SEL/YES</code> (in green). For the directional keys, you can also use the track keys labelled as such.
 
  
The behaviour and status are '''similar of those in the hardware interface''': there is support for short, bold and long press; screen access buttons are blue when no function is selected, green on it's primary and orange on its secondary function; <code>ALT</code> key changes to violet when active (and <code>F1</code>-<code>F4</code> also change).
+
# Refresh device status (LED feedback, etc)
 +
# It *SHOULD* be implemented by child class
 +
def refresh(self, force=False):
 +
logging.debug("Refresh LEDs for {}: NOT IMPLEMENTED!".format(self.dev_id))
  
The nearest four knobs has the functions of '''Knob#1''' to '''Knob#4'''. They can be used to control volume of selected/main chain, move vertically/horizontally in pattern editor or Zynpad, move selected item in menus, etc. Press <code>SHIFT</code> with a knob for a finer (slower) adjustment. The knob press is activated using the first four soft keys to the left (in green), and also has short/bold press support. The mapping is: '''Knob#1''' = (<code>K1</code>, <code>CLIP STOP</code>); '''Knob#2''' = (<code>K5</code>, <code>SOLO</code>); '''Knob#3''' = (<code>K2</code>, <code>MUTE</code>); '''Knob#1''' = (<code>K6</code>, <code>REC ARM</code>). This scheme is very comfortable in the V4 four-corners layout.
 
  
<br clear=all>
+
# Device MIDI event handler
 +
# It *SHOULD* be implemented by child class
 +
def midi_event(self, ev):
 +
logging.debug("MIDI EVENT FROM '{}'".format(self.dev_id))
  
====The Step Sequencer mode====
 
  
<embedvideo alignment="right" dimensions="600" service="youtube" description="Zynthian - Akai APC Key25 mk2 - StepSeq (alpha) demo I">https://www.youtube.com/watch?v=Y4JTWJTz2Q0</embedvideo>
+
# Light-Off LEDs
<embedvideo alignment="right" dimensions="600" service="youtube" description="Zynthian - Akai APC Key25 mk2 - StepSeq (alpha) demo II">https://www.youtube.com/watch?v=zprRUIbjHqs</embedvideo>
+
# It *SHOULD* be implemented by child class
 +
def light_off(self):
 +
logging.debug("Lighting Off LEDs for {}: NOT IMPLEMENTED!".format(self.dev_id))
  
This mode allows you to control the Zynthian's step sequencer (and also the pattern editor). You can activate it by pressing <code>SHIFT</code> + <code>SEND</code>, or in '''Mixpad''' mode pressing <code>SHIFT</code> + a sequence pad. In this mode, the pad matrix is divided in two parts: first four rows (from top to bottom) are '''the steps''' of current pattern. The last row is used to assign notes or '''instruments''' for easy access (called ''NotePads'' in this document). In this mode, you can:
 
  
* '''Assign an instrument''' to a NotePad, by pressing the PAD and then any key of the key bed (black and white keys). The note will be ''stored'' in that pad, with the velocity you used. It will be lit and the brightness is proportional to the velocity. If you press again the NotePad, it will play the note.
+
# Sleep On
 +
# It *COULD* be improved by child class
 +
def sleep_on(self):
 +
self.light_off()
  
* '''Select active instrument''', pressing <code>SHIFT</code> + a <code>NOTE PAD</code>. It will start pulsating in the color of the page.
 
  
* '''Change current instruments page''', pressing <code>LEFT</code> and <code>RIGHT</code> arrows. There are 4 pages, each with its own color (1: blue, 2: green, 3: yellow, 4: purple). Upon selecting a new page, one of the first four track buttons will be lit for a second, indicating the active page.
+
# Sleep On
 +
# It *COULD* be improved by child class
 +
def sleep_off(self):
 +
self.refresh(True)
 +
</pre>
  
* '''Toggle a step''' in the current pattern, pressing a pad in the upper four rows. If the step is on, it will be lit in red (again, the brightness is proportional to the note velocity). Note that for this to work, you will need to first select an active NotePad.
+
Quite simple, right? This is for basic “generic” drivers.
 +
Zynpad enabled drivers inherit from this base class:
  
* '''Play current pattern''' pressing the <code>PLAY</code> button. You will see the playhead (in white) moving along the steps. Pressing <code>SHIFT</code> + <code>PLAY</code> will start stage-play, which will update the pattern as it moves along the current track (press any pad to stop stage-play). Press <code>PLAY</code> again to stop playing.
 
  
* '''Panic stop''' all sounds, pressing <code>SHIFT</code> + <code>STOP ALL CLIPS</code>. Sound will stop immediately.
+
<pre>
 +
# ------------------------------------------------------------------------------------------------------------------
 +
# Zynpad control device base class
 +
# ------------------------------------------------------------------------------------------------------------------
  
* '''Adjust the tempo''' rotating the knob <code>K1</code>. The TEMPO screen will be shown briefly in the UI. Press <code>SHIFT</code> while rotating for a finer adjustment (0.1 BPM).
+
class zynthian_ctrldev_zynpad(zynthian_ctrldev_base):
 
 
 
 
<br clear=all>
 
  
==Akai MIDI MIX==
+
dev_zynpad = True # Can act as a zynpad trigger device
====ZynMixer driver====
 
  
[[File:Akai-midi-mix.jpg|800px|right]]
 
  
This Akai MIDIMix driver maps the basic mixer's functionality.
+
def __init__(self):
Chains are numbered from left to right as shown in the zynmixer screen. Note that these numbers are not MIDI channels! 
+
super().__init__()
 +
self.zynpad = self.zyngui.screens["zynpad"]
  
* '''Bank Left:''' Strips assigned to chains 1-8
 
* '''Bank Right:''' Strips assigned to chains 9-16
 
* '''Master Fader:''' Main volume
 
* '''Strip 1-8:''' Chain's mixer control, depending of bank selection
 
** '''Upper Knobs:''' The 2 upper knobs are available for MIDI learning. 
 
** '''Lower Knob:''' Chain's balance
 
** '''Mute:''' Chain's solo switch
 
** '''Solo''': Push <code>SOLO</code> to see solo status. Push <code>SOLO</code> + <code>MUTE</code> for toggling solo.   
 
** '''Rec Arm''': Red light indicates active chain. Push to set active chain.
 
** '''Fader:''' Chain's volume
 
  
<br clear=all>
+
def refresh(self, force=False):
 +
# When zynpad is shown, this is done by refresh_status, so no need to refresh twice
 +
if force or not self.zynpad.shown:
 +
self.refresh_pads(force)
 +
self.refresh_zynpad_bank()
 +
if force:
 +
self.refresh_zynpad_bank()
  
==Novation LAUNCHPAD MINI MK1==
 
====ZynPad driver====
 
  
[[File:novation_launchpad_mini_mk1_zynpad.png|800px|right]]
+
# It *SHOULD* be implemented by child class
 +
def refresh_zynpad_bank(self):
 +
pass
  
<br clear=all>
 
  
==Novation LAUNCHPAD MINI MK3==
+
def refresh_pads(self, force=False):
====ZynPad driver====
+
if force:
 +
self.light_off()
 +
for pad in range(self.zyngui.zynseq.col_in_bank ** 2):
 +
# It MUST be called for cleaning the dirty bit
 +
changed_state = self.zyngui.zynseq.libseq.hasSequenceChanged(self.zynpad.bank, pad)
 +
if changed_state or force:
 +
mode = self.zyngui.zynseq.libseq.getPlayMode(self.zynpad.bank, pad)
 +
state = self.zynpad.get_pad_state(pad)
 +
self.update_pad(pad, state, mode)
  
[[File:novation_launchpad_mini_mk3_zynpad.png|800px|right]]
 
  
<br clear=all>
+
def refresh_pad(self, pad, force=False):
 +
# It MUST be called for cleaning the dirty bit!!
 +
changed_state = self.zyngui.zynseq.libseq.hasSequenceChanged(self.zynpad.bank, pad)
 +
if changed_state or force:
 +
mode = self.zyngui.zynseq.libseq.getPlayMode(self.zynpad.bank, pad)
 +
state = self.zynpad.get_pad_state(pad)
 +
self.update_pad(pad, state, mode)
  
==Novation LAUNCHPAD PRO MK2==
 
====ZynPad driver====
 
  
[[File:novation_launchpad_pro_mk2_zynpad.png|800px|right]]
+
# It *SHOULD* be implemented by child class
 +
def update_pad(self, pad, state, mode):
 +
pass
 +
#------------------------------------------------------------------------------
 +
</pre>
  
<br clear=all>
 
  
==Novation LAUNCHPAD PRO MK3==
+
If you kind-of-understand this, you shouldn’t have problem to understand the driver examples and program your own drivers. Simply copy your driver file in the the zyngui/ctrldev folder and restart zynthian-ui. Refer to this thread for more information [https://discourse.zynthian.org/t/new-control-device-manager-controller-device-drivers/8593/1 NEW: Control-device manager + controller device “drivers”]
====ZynPad driver====
 
  
[[File:novation_launchpad_pro_mk3_zynpad.png|800px|right]]
 
  
<br clear=all>
+
==Driver Discussion on the Forum==
 +
Refer to some threads discussing driver development on different devices:
  
==Novation LAUNCHPAD X==
+
* https://discourse.zynthian.org/t/akai-apc-key25-mk2-driver/9082/168
====ZynPad driver====
+
* https://discourse.zynthian.org/t/seeking-help-refactoring-midi-controller-device-drivers-for-vangelis/13218/29
 
+
* https://discourse.zynthian.org/t/akai-mpk249-support/11825/45
[[File:novation_launchpad_x_zynpad.png|800px|right]]
+
* https://discourse.zynthian.org/t/novation-launchkey-88-mk3-driver/13359
 
+
* https://discourse.zynthian.org/t/akai-mpk-mini-plus-driver/9441
<br clear=all>
+
* https://discourse.zynthian.org/t/driver-for-ableton-push-1-first-steps/12166/63
 
+
* https://discourse.zynthian.org/t/ctrldev-driver-how-to-bypass-audio-processor-in-chain-solved/13095/9
==Novation LAUNCHKEY MINI MK3==
 
====ZynPad driver====
 
 
 
[[File:novation_launchkey_mini_mk3_zynpad.png|800px|right]]
 
 
 
<br clear=all>
 
 
 
==Behringer MOTÖR 61 / 49 ==
 
 
 
====ZynPad driver====
 
 
 
[[File:behringer_motor.jpg|800px|right]]
 
 
 
====ZynMixer driver====
 
 
 
<br clear=all>
 
 
 
==Korg NanoKONTROL ==
 
 
 
====ZynMixer driver====
 
 
 
[[File:NanoKONTROL1.png|800px|right]]
 
 
 
<br clear=all>
 
 
 
==Korg NanoKONTROL 2  ==
 
 
 
====ZynMixer driver====
 
 
 
[[File:NanoKONTROL2.png|800px|right]]
 
 
 
<br clear=all>
 
 
 
==Mackie Control==
 
 
 
[[File:mackie_control.jpg|800px|right]]
 
 
 
<br clear=all>
 

Latest revision as of 11:33, 2 August 2026

1 Introduction

Zynthian can be connected to almost any existing MIDI device and you can use the MIDI learning mechanism, as described in the UI user's guide, to assign parameters to faders and knobs in your MIDI controller, for instance. You could also assign pad trigger to notes, etc. But MIDI learning process takes time, it's limiting and you can't get feedback easily. Sometimes it's a lot better to plug a well-known (supported) MIDI controller and get everything mapped automatically. For having this, Zynthian implements a controller driver API that allows developers to create specific drivers for specific devices.

1.1 Supported Drivers and Guides

  • After expanding greatly, the driver page has been split into multiple pages according to similar devices. See Driver Pages for a categorised list of device driver pages.
  • There is also a sortable table of devices to get a glance of what devices have drivers and what functions are available for them. Click the title link to go to the device driver page.
  • As with the rest of the wiki, some information here may be slightly out of date, there may be devices available that aren't shown here. For more up to date info on driver development, see the forum. For a list of drivers currently integrated into Zynthian you can check the (Vangelis version) list on github.

1.2 Accessing Drivers in Zynthian

As the title hints, if you connect your device (via USB), Zynthian will automatically load the driver if a compatible one exists. Where there are multiple drivers for a given device (or to use a generic driver such as Mackie Control, the active driver mode can be selected from within the Midi Input Devices menu from the Chain Manager screen or the individual chain options screen (also the admin menu). Bold press the driver entry for further options.

1.3 Driver Functions

This section contains documentation for some of these controller drivers. There are two core driver functions which control the primary screens in the Zynthian UI:

  • Launcher mode (Zynpad): Launch patterns in the launcher grid interface (as with DAWs like Ableton or Logic)
  • Mixer mode (ZynMixer): Control chain levels, mutes and solo. Different devices may have some additional controls and functions.

There are also additional driver modes/functions depending on the device and driver:

  • UI Navigation: Adds some degree of UI navigation control via arrow buttons or by emulating encoders & buttons on the device
  • SuperLooper Mode: Provides an interface to the native SuperLooper UI within Zynthian for looping live performance.
  • Sequencer Mode (ZynSeq): (Sequencer functionality for the device depends on the Zynthian version installed) Provides some degree of control over the sequencer or pattern editor.
  • Moder Mode: Adjusts device note inputs to stay in scale or provides some chord functionality


2 Driver Pages

3 Table of Device Features

Device Launcher mode (ZynPad) Mixer mode (ZynMixer) UI Navigation SuperLooper mode Sequencer mode (ZynSeq) Moder (chords/scales) Extra features / notes
Akai APC Key25 MK2
Akai apc key25 mk2.png
yes yes no no yes no Mixpad (default) controls Mixer + ZynPad; also Step Sequencer / pattern editor; Device mode controls the Zynthian UI.
Akai APC Key25 MK2 + SL yes yes yes yes yes no Adds SooperLooper looper controls + Levels/Pan/Sync&Quantize/Session save+load; base modes otherwise match the non-SL driver.
Akai MIDI MIX
Akai-midi-mix.jpg
no yes no no no no Maps mixer functionality (chains 1–16 via banks, master slider, balance, mute/solo, rec-arm).
Akai MPK mini MK3
Akai-mpk-mini-top.jpg
yes yes no no yes no Modes: Mixer (default), Device UI, Pattern (ZynPad + Pattern Editor), NotePad; plus User and Config modes.
Akai MPK mini MK3 Moder no no no no no yes This is a very simple "Mode Enforcer" driver for the Akai MPK mini MK3.
Novation LAUNCHPAD MINI MK1
Novation launchpad mini mk1 zynpad.png
yes no no no no no ZynPad driver.
Novation LAUNCHPAD MINI MK3
Novation launchpad mini mk3 zynpad.png
yes no no no no no ZynPad driver.
Novation LAUNCHPAD PRO MK2
Novation launchpad pro mk2 zynpad.jpg
yes yes yes no no no Three modes using the top row buttons:
  • Launcher - similar function to Ableton Live
  • Mixer - volume, pan and (needs testing) sends
  • Device Control - emulates the 20 button array of the V5 and encoder buttons
Novation LAUNCHPAD PRO MK3
Novation launchpad pro mk3 zynpad.jpg
yes no no no no no ZynPad driver.
Novation LAUNCHPAD X
Akai-mpk-mini-top.jpg
yes no no no no no ZynPad driver.
Novation LAUNCHKEY MINI MK3
Launchkey mini mk3.jpg
yes yes no no no no Mixer + ZynPad.
Novation LAUNCHKEY 88 MK3
Launchkey 88 mk3.jpg
yes yes no no no no Mixer + ZynPad.
Behringer MOTÖR 61 / 49
Behringer motor.jpg
yes no no no no no This driver is focused in stage control of setBfree and Pianoteq engines. It also includes the mode enforcer that can be controlled from the pads (notes).
Korg nanoKONTROL
NanoKONTROL1.png
no no no no no no Not currently available.
Korg nanoKONTROL-2
NanoKONTROL2.png
no yes no no no no ZynMixer driver with UI navigation.
Mackie Control
Mackie control.jpg
no yes no no no no This driver can be loaded for devices that support MCU protocol and variants.
Fostex Mixtab
Mixtab.png
no yes no no no no This driver maps the hardware controls to relevant parameters in zynthian (mostly zynmixer).
Teenage Engineering OP-1
Te-op1.jpg
no no no no no no Encoder control of parameters and UI navigation via encoders and buttons.
SooperLooper CCx10, for Behringer FCB1010 & others
Fcb1010.jpeg
no no yes yes no no SooperLooper CCx10 controller support.
Worlde Mini Moder Driver
Worlde mini midi keyboard
tbc tbc tbc no no yes
Akai MPK249
Akai mpk249
tbc tbc tbc no no no
Launchkey Mini Mk4 37
Launchkey Mini Mk4
tbc tbc tbc no no no
Launchkey Mini Mk3
Launchkey Mini Mk3
yes yes tbc no no no
Launchkey Mk3 88
Launchkey88
yes yes tbc no no no
Launchkey Mk4 37
Launchkey37-MKIV
tbc tbc tbc no no no
Sinco smk25
Simco smk25
tbc tbc tbc no no no
Arturia Keylab Mk2 61
Arturia keylab mk2 61
yes tbc tbc no no no





4 Technical Info For Driver Developers

Drivers are python modules implementing a class. This class can call internal zynthian-ui API, so it has full access to Zynthian functionality. It’s not limited by CUIA. No limits, so you can break the UI too 😉

NOTE: the name of the class should be identical to that of the file name. This is a common pitfall when developing new drivers.

dev_ids is a list of identifiers that the driver will match. You can find this by looking at the name of the device in the MIDI Input view in Zynthian. If you bold press the corresponding input to see its options menu, the "Rename port" option shows its USB port / MIDI input name. Use the MIDI input name for your dev_ids list, e.g. Rename port 'USB:2.2/Launchkey Mini MK3 In 2' would provide the device id: "Launchkey Mini MK3 In 2".

You can check the full code here:

zynthian-ui/zyngui/zynthian_ctrldev_manager.py zynthian/zyngine · GitHub

and some example drivers here:

zynthian-ui/zyngine/ctrldev/ · GitHub

All drivers must inherit from zynthian_ctrldev_base, implementing the needed functionality as commented in the base code:


#------------------------------------------------------------------------------------------------------------------
# Control device base class
#------------------------------------------------------------------------------------------------------------------

class zynthian_ctrldev_base():

	dev_id = None  		# String that identifies the device (class variable!)
	dev_zynpad = False		# Can act as a zynpad trigger device
	dev_zynmixer = False	# Can act as an audio mixer controller device
	dev_pated = False	# Can act as a pattern editor device


	# Function to initialise class
	def __init__(self):
		self.idev = 0		# Slot index where the device is connected, starting from 1 (0 = None)
		self.zyngui = zynthian_gui_config.zyngui


	# Setup the device connected in slot #idev
	# Before calling this, the caller (ctrldev-manager) should check that driver's ID string matches device's ID string
	def setup(self, idev=None):
		if idev != self.idev:
			# Release currently selected device, if any ...
			self.release()
			# Init new selected device
			if idev > 0:
				self.idev = idev
				logging.info("Setting-up {} in slot {}".format(self.dev_id, self.idev))
				# Setup routing
				lib_zyncore.zmip_set_route_extdev(self.idev - 1, 0)
				zynautoconnect.midi_autoconnect(True)
				# Initialize new selected device
				self.init()
				self.refresh(force=True)


	def release(self):
		if self.idev > 0:
			logging.info("Releasing {} in slot {}".format(self.dev_id, self.idev))
			# If device is still connected, call end
			dev_id = zynautoconnect.get_midi_device_name(self.idev)
			if dev_id and dev_id == self.dev_id:
				self.end()
			# Restore routing
			lib_zyncore.zmip_set_route_extdev(self.idev - 1, 1)
			zynautoconnect.midi_autoconnect(True)
		self.idev = 0


	# Refresh device status (LED feedback, etc)
	# It *SHOULD* be implemented by child class
	def refresh(self, force=False):
		logging.debug("Refresh LEDs for {}: NOT IMPLEMENTED!".format(self.dev_id))


	# Device MIDI event handler
	# It *SHOULD* be implemented by child class
	def midi_event(self, ev):
		logging.debug("MIDI EVENT FROM '{}'".format(self.dev_id))


	# Light-Off LEDs
	# It *SHOULD* be implemented by child class
	def light_off(self):
		logging.debug("Lighting Off LEDs for {}: NOT IMPLEMENTED!".format(self.dev_id))


	# Sleep On
	# It *COULD* be improved by child class
	def sleep_on(self):
		self.light_off()


	# Sleep On
	# It *COULD* be improved by child class
	def sleep_off(self):
		self.refresh(True)

Quite simple, right? This is for basic “generic” drivers. Zynpad enabled drivers inherit from this base class:


# ------------------------------------------------------------------------------------------------------------------
# Zynpad control device base class
# ------------------------------------------------------------------------------------------------------------------

class zynthian_ctrldev_zynpad(zynthian_ctrldev_base):

	dev_zynpad = True		# Can act as a zynpad trigger device


	def __init__(self):
		super().__init__()
		self.zynpad = self.zyngui.screens["zynpad"]


	def refresh(self, force=False):
		# When zynpad is shown, this is done by refresh_status, so no need to refresh twice
		if force or not self.zynpad.shown:
			self.refresh_pads(force)
			self.refresh_zynpad_bank()
		if force:
			self.refresh_zynpad_bank()


	# It *SHOULD* be implemented by child class
	def refresh_zynpad_bank(self):
		pass


	def refresh_pads(self, force=False):
		if force:
			self.light_off()
		for pad in range(self.zyngui.zynseq.col_in_bank ** 2):
			# It MUST be called for cleaning the dirty bit
			changed_state = self.zyngui.zynseq.libseq.hasSequenceChanged(self.zynpad.bank, pad)
			if changed_state or force:
				mode = self.zyngui.zynseq.libseq.getPlayMode(self.zynpad.bank, pad)
				state = self.zynpad.get_pad_state(pad)
				self.update_pad(pad, state, mode)


	def refresh_pad(self, pad, force=False):
		# It MUST be called for cleaning the dirty bit!!
		changed_state = self.zyngui.zynseq.libseq.hasSequenceChanged(self.zynpad.bank, pad)
		if changed_state or force:
			mode = self.zyngui.zynseq.libseq.getPlayMode(self.zynpad.bank, pad)
			state = self.zynpad.get_pad_state(pad)
			self.update_pad(pad, state, mode)


	# It *SHOULD* be implemented by child class
	def update_pad(self, pad, state, mode):
		pass
#------------------------------------------------------------------------------


If you kind-of-understand this, you shouldn’t have problem to understand the driver examples and program your own drivers. Simply copy your driver file in the the zyngui/ctrldev folder and restart zynthian-ui. Refer to this thread for more information NEW: Control-device manager + controller device “drivers”


5 Driver Discussion on the Forum

Refer to some threads discussing driver development on different devices: