Personal tools
You are here: Home documentation tutorials/howtos Pd for Max users

Pd and Max are very similar programs, so if you know one and want to learn the other, you can transfer a lot of knowledge and principles to the new software. This page deals with some of the differences that a user coming from Max/MSP will encounter when switching over to Pd. For the easiest transition, you'll probably want to use the 'cyclone' library, which is a library clones of Max/MSP objects ('cyclone' is included in Pd-extended).

Always use the [trigger] object

In Max the ordering of (message) patchcords coming from the same outlet execute in a right-to-left and bottom-to-top order depending on where the receiving atoms are located on the canvas. In Pd, such ''fanning connections'' execute in the order they were created. Either way it is problematic: In Max, when you clean up your patch and rearrange the atoms you can break the logic accidently. In Pd it is impossible to know by looking at the patch which connection has been made first. The solution for both, Max and Pd is to always use [trigger] object and create it so that it has one outlet for each connection. These then fire from right to left.

Pd has no integers

Every number in Pd is a floating point number. Pd doesn't have integers. The [int] object simply truncates the floating point numbers at the decimal devider, but the datatype stays the same for the programming language. Normally that's not an issue, but if you have abstractions that you want to port, which rely on the difference between integers and floats, you maybe can take a look at the [int-or-float] abstraction in the Pd port of Khz Essl's RTC-lib.

[gate] becomes [spigot]

Pd has no [gate] object builtin. Instead there is the [spigot] which is like a one-outlet gate, but with reversed inlets. (cyclone provides a Max/MSP-compatible [gate]?)

Replacing [cycle~]

Instead of [cycle~] use [osc~] in Pd. Note that the right phase inlet of [osc~] is just a message inlet, so you cannot do phase modulation with it. For phase modulation, use a combination of [phasor~] and [cos~]. There is an example in the help-patches: Pure Data/ Also the cyclone external provides a Max/MSP-compatible [cycle~]?.

[zl] and lists

Pd's [list] is a rough equivalent of [zl], though it works differently. It forces everything to be a "list', meaning it will add the word "list" to the beginning of any message that goes through a [list]. You can get rid of the "list"-selector with [list trim]. Building upon the [list] object is the [list]-abs collection of abstractions (included in Pd-extended and pure:dyne). [list]-abs provides a wide range of list manipulations.


You can use [list prepend] as a prepend, but it is not quite the same as Max/MSP's [prepend]. One important difference however is that [list prepend] generates so called "list-messages" that internally start with the symbol "list". For example [list prepend set] when send a number will generate a message "list set <number>" instead of "set <number>" messages like Max's [prepend].

If you want to use Pd-vanilla only and have a Max/MSP-style [prepend], you can use [list prepend] and [list trim]. Put both the prepend- and the trim-operation into an abstraction called "prepent.pd" with a "t" for "trim". (cyclone provides a Max/MSP-compatible [prepend]).

Cyclone library

Many of the Max objects are part of an externals collection called "cyclone" that also comes with Pd-extended. Cyclone includes another Max/MSP file loader. In Pd-extended, create a [cyclone/maxmode] object and click on that to get the open panel.

Opening and Saving Max Patches

Pd can open and save Max 'text' patches with a .pat file extension. Pd-extended can also open Max/MSP's .help and .mxt files. If you want to save a patch as a Max/MSP .pat file, do File -> Save As, then manually type the '.pat' extension when you are saving.

Max 5 introduced a new JSON-based file format with the extension .maxpat. Max 5 can still read the older Max 4 format .pat and .mxt formats that Pd can export, but MaxMSP? 5 can no longer write .pat or .mxt format files that Pd can directly read. Cyclone also can not read the new .maxpat file format.

Fredrick Olofsson has written a SuperCollider? patch that can convert a Max 5 .maxpat file into a Max 4-compatible .pat file. The .pat files resulting from the conversion can then be opened in Pd or Cyclone.

Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser