MIDI output via PD


I’m trying to get PD to work as a midi effect, without success so far. and pretty sure I’m missing something obvious as I’m still very new to the Zynthian and to PD.

Right now I’m just testing the midi functionality by using a simple patch with a notein object connected to a noteout object. Just to see if the midi passes through, which it doesn’t. It does when I run the same patch on my PC. I’ve uploaded the patch via webconf as a pd file, and as a zip, both don’t work. The correct hardware midi out is also selected in the midi routing of the layer I’m using for PD.

Did I forget something essential to get MIDI output to work?


midi thru.pd (133 Bytes)

I just tested and works for me. Check the existing examples and replicated the directory structure.
Every PD patch must be stored a subfolder named like the patch.

BTW, uploading “pd” files from the webconf’s “preset manager” seems to be broken. Could you kindly open a issue on the tracking system?


Sure! I’ll make an account on github so I can open issues as well.

Hmm strange, still not working. At first I thought maybe it’s the version of PD I used to make the patch, but if it works for you there must be something else. I named the folder the same as the file, using WinSCP. This is the location (/zynthian/zynthian-my-data/presets/puredata/midi thru). Still no luck. I also can’t see any files via WinSCP in the “synths” example folder, while there are indeed pd files present that I can see and open from the Zynthian GUI.

Try removing the space from the filename …


Tried this but still no luck! There must be something obvious I forgot to do? It works when I use a regular midi thru FX plugin for the same midi channel, just not when I use the PD layer. The PD layer does work with the example patches so it’s definitely something I overlooked.

Once I get the midi thru to work, my next goal is to try out the patch I added below. It recognizes chords using the “chord” object, and then sends out CC’s and the note number of the fundamental, no matter which chord inversion I’m playing. This is used to transpose my Squarp Pyramid sequencer with the same hand I’m playing chords with. Also the Pyramid can transform all midi notes to fit with specific scales (this is why I need the CC messages). Basically the Pyramid is lacking the chord recognition part, while it does do everything else, this is where the Zynthian running PD could come in handy! chord to cc2.pd (4.9 KB)

Hi @jofemodo , I finally got the thru patch working! Very happy! I was using the wrong path for my PD files. The incorrect location was “zynthian/zynthian-my-data/presets/puredata” and the location that works for me now is: “home/pi/zynthian-data/presets/puredata”. (I had the feeling it was something obvious like this) Now that the notein to noteout patch works I can continue to get my final patch working, which as it is now does not work yet. It uses two external libraries (maxlib and zexy). I saw both are already installed on the Zynthian. Is there anything specific I need to do to get these working, or should my externals work as it is now? Also my PD patch involves some MIDI CC’s as outputs. They are not controlled by any midi controller, just triggered from within the patch via midi notes. Do I still need to specify which cc’s are being used with a YML file, or is this only needed in case of using external midi controllers? chord-to-cc2.pd (4.9 KB)

Hi @Jacco, here’s what I did to make your patch work on my Zynthian.

Add the following new object: declare -lib zexy

Change the object chord to: maxlib/chord

If you make these changes using your Zynthian, you will need to save the patch and then reload it before it will work. If you make these changes on a pc and upload the revised patch to the Zynthian, it should work the first time you load it.

Also, on the Zynthian midi ch 16 is set to the master channel by default and is used to control the Zynthian UI with midi messages. You may want to change your notein 16 object to a different midi channel, or change the Zynthian’s master channel using the WebConf.

Ah wow thanks @ronsum ! I did what you suggested and it’s working perfectly now! I had maxlib working already, but couldn’t figure out how to get zexy working, but now it all works beautifully! This was the last missing piece in my setup, so now I ran out of excuses for not making music all the time!

For anyone interested in using this: with this patch running on the Zynthian, it’s possible to augment the Squarp Pyramid sequencer with a chord detection function. The Pyramid can already re-scale and transpose all it’s midi sequences to specific keys and scales, but lacks a chord detection function to be able to control these functions with a keyboard in a musical way.

Exactly !! :face_with_monocle:

The exact requirements of this request can be revealed by pressing on the monocled icon above … :smiley:

1 Like

Haha ok ok working on it! I’ll post something here this week!


Here’s an experiment I just did. For sound I’m using an MPC1000 + DSI Tetra + Lexicon LXP-1 and LXP-5 + Fostex DCM100 (mixer). Then recorded onto a Marantz PMD420 cassette unit, which is then recorded with the Zynthian audio recorder. I’m using the same sequences for the entire track, only changing tonality and key using the PD patch running on Zynthian combined with Squarp Pyramid.


All rather Tim Blake like which is high praise indeed !!! :slight_smile:

I have recently thrown out a Marantz CD230 which hadn’t faired well in twenty years of storage… Those rubber bands dont last. . .

Always like to see pictures of kit. . .






Ha thanks! These Marantz cassette units are built very well! Mine might need a new belt and some cleaning though, as I think it still has the original belt from the 80’s…

Ah here are some pics of the setup as it is now:


You have TWO SM124’s?