Building a Jungle track in Pure Data (while still leaving things to chance)

The idea

Alternative structuring principles for Jungle and Drum & Bass tracks aside (e.g. like using the Fibonacci sequence), tracks in these genres usually follow a general buildup scheme that is – to a certain extent – standardized, in particular if they’ve been written for a DJ mix related purpose.

Without going too much into detail, this scheme roughly contains an intro, a main part and an outro where parameters like the number of active elements, general complexity or sound intensity can differ. Buildup and change within these parts usually follow a certain implicit set of rules and habits (e.g. reducing sound intensity before the next major part begins – aka the breakdown).

Combining these structural presets with a generative approach was the framework condition for a patch setup in Pure Data, audio examples are below the following description.

The patch

As in previous patches this setup also uses the BPMengine abstraction to generate bangs on different note values from whole note (calculated with meter given) to 32th note in a pre defined tempo in BPM.

These are used both for triggering events in other abstractions and for calculations of cycles.

The track structuring is being done by processing 8th note values via the trackbuilder abstraction. Core parameters here are a the bar length (used to calculate the meter) and the length of the respective sections, e.g. DJ intro, Drop main or Drop 2 (defined by the values in the number boxes). Active sections forward 1s on every bar’s first note through a dedicated outlet (0s when inactive) and are being processed by subpatches containing messages to change parameters elsewhere in the setup. For more liveliness and unpredictability, each subpatch contains a message that is only triggered with a predefined chance.

On instrument’s side, there is breakbeat generator with a dedicated effect chain tied to an envelope follower and some other randomizing parameters…

…a hi-hat abstraction with static but randomizable patterns as well as a simple sample player…

…and bassline generators as well as other melodic synths (pads, blips, arpeggio) that use different pattern and sequencing mechanisms but are all tuned to a particular global key midi note and harmonic scale.

Sound examples

Below are two recordings using different parameters and sequencing mechanisms as well as two different sample sets.

Update 13.09.23: In an earlier version of this post, I’ve provided the source code for this in my algomusic GitHub repository. I’ve recently taken down the repo, but you can find all the components discussed on the PD-components repository now.