Pure Data

From ZynthianWiki
Jump to navigation Jump to search

Pure Data (or just Pd) is an open source visual programming language for multimedia. Its main distribution (aka Pd Vanilla) is developed by Miller Puckette.

It is a major branch of the family of patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, etc), originally developed by Miller Puckette at IRCAM.


Preparing PD patches for working with Zynthian

The engine will run any standard patch for "pd vanilla". No "pd extended" support, as it's deprecated.

Although any "vanilla" patch should work out-the-box, you would like to have your MIDI controllers correctly mapped and labeled. Don't worry!! Integrating patches for working nicely with Zynthian is pretty easy. The trick is done by a simple YAML config file called "zynconfig.yml" that should be present in the patch folder. If no config file is found, the engine will try to detect the patch's main file and some default controllers will be created.

You can use the example patches as reference for "patch integration". This is an example:

   main_file: "threeosc1.pd"
     midi_cc: 7
     value: 64
     midi_cc: 2
     value: '1'
     labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16']
     midi_cc: 1
     value: 64
     midi_cc: 63
     value: 64
     midi_cc: 65
     value: 64
     midi_cc: 66
     value: 0
     midi_cc: 67
     value: 0

As you can see, there is little to explain. You can specify more options for the controllers, "ticks" values for the "labels", etc.. Take a look to zyngine/zynthian_controller.py for more details. Currently only MIDI integration is implemented, although OSC wouldn't be difficult to implement.

Of course, you have to customize a little bit your patches for getting a good integration, specially if you want "selector" controllers, like the "program" selector in the example above.

Finally, my experience with PD is really small, so i would appreciate any feedback, suggestion or help for improving the new engine.