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

The Beach Boys’ SMiLE: a complete chronological sessionography

smile

In 2012, I published an article (Heiser, 2012) in the peer-reviewed online Journal on the Art of Record Production regarding Brian Wilson and The Beach Boys’ SMiLE project. It consisted of one half of a chapter featured in my new book Popular Music, Power and Play (Heiser, 2021: published by Bloomsbury Academic) – an in-depth case study analysis of the 1966-67 aborted SMiLE sessions. At the time of writing, I was frustrated by the fact there was no reliable and complete chronological sessionography, so I set about making one myself and placed it in the appendices of my thesis document.

I was surprised to find that as a result of doing so I gained some very valuable insights into the hows and whys of the project that wouldn’t have been evident without such a list. Hopefully, now you might do the same. Also of interest is the fact that I’ve included which tracks in the The Beach Boys: The SMiLE Sessions box set (2011) relate to which dates, so you make up your own chronological playlist in iTunes* as opposed to the song-by-song order featured in the box set.

Click here to download this pdf document exactly as it appears in my thesis with page numbers detailed (pp.181-191). If you want to refer to this document in your own work please reference (APA6) as:

Heiser, M. (2015). The playful frame of mind: An exploration of its influence upon creative flow in a post-war popular music-making context (Doctoral thesis). Brisbane: Griffith University.

Click here to buy The Beach Boys: The SMiLE Sessions (2011) box set – including 5 audio CDs, Double Vinyl LP (12″ album, 33 rpm), 2 singles (7″, 45rpm), book, poster and original artwork etc from Amazon.com

Click here to buy The Beach Boys: The SMiLE Sessions (2011) box set – 5 “disc” mp3 album from Amazon.com (*This version is a great low cost alternative if you want to build your own chronological iTunes playlist. The tracks are set out in the same order as the 5 CDs in the full box set, but with added advantage of allowing you to buy only the tracks you need individually).

Enjoy.

widget_P_M_P_P

References:

The Beach Boys (2011). The Beach Boys: The Smile sessions. [CD, vinyl singles & album]. New York, NY: Capitol Records.

Conditionals for Pure Data: Interactive tutorial

Computer programs need to determine how to proceed at certain points in their program flow, depending on whether certain predetermined (or variable) conditions have been met or not. Such operations are a mainstay of computing and are known as a “conditional” test. For example, when a condition has been met, a result of TRUE (“1”) is produced, otherwise a FALSE (“0”) message results: these are known as Boolean values. Conditional tests (or conditionals for short) are particularly useful in programs such as “generative” music compositions, where the “rules of the game” are predetermined, and require no further input from the programmer after the piece has started.

The conditionals provided in Pure Data (Pd) are very basic, consisting of simple relational operators (such as == [“equals”], != [“not equals”], <, <=, >,  >=) and logical operators ( && [“and”],  || [“or”]). In order to make your own conditional objects that match the complexity of what Max/MSP offers as standard, you’ll need to have a look at the 9 (interactive) examples illustrated above. By changing the values in the yellow boxes, each test will produce one of two possible outcomes.

Whereas Pd’s relational and logical operators produce Boolean values, a “Select” object is necessary in order to produce a “bang” result (which is often necessary when programming in Pd). In the examples provided, the select object has been used to produce either a bang (only if a TRUE value results) or two different bangs (one for TRUE and another for FALSE).

Click here to download the interactive tutorial. Please note, you’ll first need to have Pure Data (Pd) installed on your computer to use this app (it’s free). Once you understand how each of the provided complex conditionals work, you can then embed them in their own subpatches, making your patcher window much less cluttered (as illustrated in the orange square next to example 1. Click on the pd X==Y object to see “inside”). In order to get more information on what each discreet Pd object can do control+click (Apple users*) on the relevant object. Enjoy.

The downloadable interactive tutorial is (cc) 2016 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

Pure Data: Reference Card

If you use the Pure Data (Pd) visual data-flow programming platform, or plan to, then this downloadable pdf will be essential. It outlines the correct names and functions of the Pd “objects.” Without this chart you’ll find yourself forever stalling, as you try to find that object you need and can remember by function, but not quite by name. To create an object using this chart, simply enter “edit” mode (command-click + E)* and command-click + 1 on the “patcher” window (not the Pd window), or select “object” from the “Put” menu. Type in the object’s name and you’re done. To find out more about what each object does simply control-click the object and select “help.” This very useful reference tool was kindly created/shared by Karim Barkati and may be freely distributed (see license details below).

CLICK HERE to download the Pure Data Reference Card.

*My apologies to all the PC users out there. Since Apple computers have become the standard for the audio industry I’ve adhered to this standard for the sake of simplicity (please use your PC equivalents).

Copyright (c)  2010 Karim Barkati <karim.barkati@gmail.com>. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

banner_P_M_P_P_3