Here is a simple example to explain how to link the zynthian encoders to a pure data patch. I create the pd file and yaml file on my windows pc.
First I created a pd patch named main. It has 2 sinewave oscillators and a volume control. In the main patch, OSC 1 is controlled with midi cc 18, OSC 2 is controlled with midi cc 19 and the volume is controlled with midi cc 7. The initial midi cc values are set with the loadbang. I used the following initial values: 16 for osc 1, 36 for osc 2 and 20 for Volume. Next I used Notepad++ to create a yaml file named zynconfig.yml. This file has the information to link the zynthian encoders to the puredata patch. The midi_cc numbers and values are the same as used in the patch. The first line of the yaml file is used to point to the pd file to be controlled. The third line is midi_controllers:
Next I define each controller with it’s name, midi_cc number and value. The indent spaces, colons and underscores used are very important. In this example I am only using three controllers, so the zynthian will display all three on the first page (Controllers#1). For patches using more than four controls, I use a space between groups of four controls in the yaml file. This helps me visualize what each controller page will look like on the zynthian. I place the pd and yaml file in a new folder named OSC2. Then I select both files and right click to bring up the popup window.
Then I select Send to Compressed (zipped) folder and name the zip folder 2OSC. Next, I boot my zynthian and go to the zynthian webconf on my pc. Then I select Library, Presets & Soundfonts, PureData-Visual Programming and highlight MY/synths to upload the 2OSC.zip file to the Zynthian.
Here’s the zip file: 2OSC.zip (746 Bytes)