Conditionals for Pure Data: Interactive tutorial 2: Using the ‘expr’ object.

This is the second interactive tutorial regarding making your own conditionals in the Pure Data open-source programming platform. This time the ‘expr’ object is used.  Click here to download. Please note that this particular object chews up more CPU than those featured in the previous tute. You will also first need to have Pure Data (Pd) installed on your computer to use this app (it’s free). The reason for emphasizing the use of conditionals in Pd here is twofold: (i) functions that exploit variables and probability form the bedrock of simple generative music programs, and (ii) unlike Max/MSP, Pure Data doesn’t come with conditionals included: you have to make them yourself or use someone else’s.

Conditionals are decision-making blocks of code: something like rules in a game. You can tell parts of your program to do something WHEN or IF specific criteria have been met, or ELSE to do something different.

When making a generative music program for the first time, there’s no need to worry too much about decisions regarding each conditional’s behaviour or where these little blocks of code fit into the overall program. What’s most important is that they’re there at all. You can have a lot a fun just taking any music programs you might already have and letting the (numerical) output of one part of the program influence the behaviour of another. In this way, you can automate small sections of a program and, bit by bit, get a feel for what conditionals can do. The more parameters and triggers that you connect, the closer you get to creating a fully-fledged generative music app.

Each of the conditionals illustrated above (and combinations thereof) can be embedded within ‘pd objects’ (or as ‘abstractions’) which are something like Pd’s equivalent functions. This will not only make your Pd patches cleaner, but you’ll see similarities with the architecture of modular synthesisers, where you can have fun plugging ‘this’ into ‘that’ to see what happens.

If you’re a John Cage type, then as long as the program flows well you’ll probably be happy with the results, regardless of the aesthetic feel. If you’re more of a Brian Eno, then you’re likely to be more selective. In the latter  case, you might like to try out different combinations of conditionals, as well as, their relationship to the various parameters being influenced, such as those belonging to: tone generators; filters; pitches; the triggering of sequences (and sequencers); (opening/closing) gates (‘spigots’ as they’re called in Pd); tempo; choosing pathways (form, challenge ‘levels,’ duration etc), or anything you can imagine! Tinker away until you find results that please you.

To get more information regarding what each discreet Pd object can do, control+click on the relevant object (Apple users). Enjoy.

The expr object is created by Shahrokh Yadegari. The downloadable interactive tutorial is (cc) 2019 Marshall Heiser (Attribution 4.0 International). This license lets you distribute, remix, tweak, and build upon my work, even commercially, as long as you credit me for the original creation. Any derivatives will also allow commercial use. Click here for more licence details.

widget_P_M_P_P

Advertisement