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: Major Scale/Circle of 5ths App

This slideshow requires JavaScript.

Click here to download this app for free.

This is an app I designed and coded a few years ago using Pure Data (Pd). I did it as an exercise in coding the Graphic User Interface (GUI) features of the platform. It functions as an interactive music theory learning aid and visually/aurally indicates the 12 possible major scales, their note names/scale-position numbers, and their overall relationships according to the “circle of fifths.”

To use it, simply select a scale from the red “circle of fifths” panel. The virtual piano keyboard notes will indicate the notes of the chosen scale (in green) along with their scale-position numbers. Use your computer mouse to play the notes by clicking on the green keys. To remove the green keys, hit “reset.”

You will need to have Pure Data (click here) already installed on your computer to use this app*. Turn your computer audio volume down to zero (this is standard health and safety procedure when using audio applications). Open the file and click the “AUDIO ON/OFF” toggle switch so that it shows an X (this turns Pd’s audio engine on). Now, hit any virtual piano key whilst gradually turning up your computer volume to a comfortable level. You’re ready to go.

If you are new to Pd and experience any problems hearing the audio, select the “MEDIA” drop-down menu in Pd. Here you can (amongst other things) test your audio/MIDI settings (with test tones etc). Be sure not to have your computer audio output or speakers set too high during this process!

If you would like to learn how to make an interaction virtual keyboard such as the one featured click here to read a very good free online tutorial by Johannes Kreidler (translated by Mark Barden). It’s an extract from Kreidler’s book Loadbang: Programming Electronic Music in Pd (2013). Click here to buy the paperback edition of Loadbang: Programming Electronic Music in Pd through Amazon.com.uk

*Once again, apologies to PC users if you experience any problems. These instructions are designed for Apple OS users, since it has become the defacto industry-standard for audio. Please note: Pure Data is however available for Windows and Linux users.

This app is (cc) 2015 Marshall Heiser. (Attribution-ShareAlike 4.0 International). This license lets you remix, tweak, and build upon my work even for commercial purposes, as long as you credit me and license your new creations under the identical terms. Any derivatives will also allow commercial use. Click here for more licence details.