Pure Data Artificial Neural Network Patch from Scratch

Coding (well, “patching”) an artificial neural network in Pure Data Vanilla to create some generative ambient filter pings.

From zero to neural network in about ten minutes!

In audio terms, an artificial neuron is just a nonlinear mixer, and, to create a network of these neurons, all we need to do is run them into each other. So, in this video, I do just that: we make our neuron, duplicate it out until we have 20 of them, and then send some LFOs through that neural network. In the end, we use the output to trigger filter “pings” of five different notes.

There’s not really any kind of true artificial intelligence (or “deep learning”) in this neural network, because the output of the network, while it is fed back, doesn’t go back an affect the weights of the inputs in the individual neurons. That said, if we wanted machine learning, we would have to have some kind of desired goal (e.g. playing a Beethoven symphony or a major scale). Here, we just let the neural network provide us with some outputs for some Pure Data generative ambient pings. Add some delay, and you’re all set.

There’s no talking on this one, just building the patch, and listening to it go.

0:00 Demo
0:12 Building and artificial neuron
2:00 Networking our neurons
3:47 Feeding LFOs into the network
4:20 Checking the output of the network
5:00 Pinging filters with [threshold~]
8:55 Adding some feedback
10:18 Commenting our code
12:47 Playing with the network

Creating an artificial neuron in Pd:

Pinging Filters in Pd:

More no-talking Pure Data jams and patch-from-scratch videos:

“Krell Muzak” Generator in Kyma 7

Using Kyma 7 to create some generative Sci Fi music inspired by Todd Barton’s “Krell Music” patch on the Buchla Synthesizer.

Once again, I’m back with more ancient music of the Krell. As I mentioned previous weeks, in my regular journeys across the internet, I came across the concept of a “Krell Music” patch–a self-generating patch created by Todd Barton, inspired by Bebe and Louis Barron’s soundtrack to the 1956 film “Forbidden Planet.” The Barrons’ soundtrack to the film is amazing, and a bit beyond what I can get into here (see links below). Barton’s Buchla patch tries to capture some of the dynamic timbres of that score.

My oversimplification of the idea is this: a note has an amplitude envelope–attack and release–and when that amplitude envelope ends it triggers the next envelope. At the same time, that trigger selects a new (likely different) attack and decay time, as well as a new pitch and timbre for the next note. So we create a continuous series of musical tones, each distinct from the one before it.

So, this time, let’s make it in Kyma.

Reaktor 6 Primary “Krell Music” Generator (Sci-Fi Ambient Music)

Using Reaktor 6 Primary to create some generative Sci Fi music inspired by Todd Barton’s “Krell Music” patch on the Buchla Synthesizer.

As I mentioned last week, in my regular journeys across the internet, I came across the concept of a “Krell Music” patch–a self-generating patch created by Todd Barton, inspired by Bebe and Louis Barron‘s soundtrack to the 1956 film “Forbidden Planet.” The Barrons’ soundtrack to the film is amazing, and a bit beyond what I can get into here (see links below). Barton’s Buchla patch tries to capture some of the dynamic timbres of that score.

My oversimplification of the idea is this: a note has an amplitude envelope–attack and release–and when that amplitude envelope ends it triggers the next envelope. At the same time, that trigger selects a new (likely different) attack and decay time, as well as a new pitch and timbre for the next note. So we create a continuous series of musical tones, each distinct from the one before it. So let’s make that in Reaktor 6 Primary.

Making a “Krell Music” Patch in Pure Data (Generative Sci-Fi Music)

Putting together a music (muzak?) generator in Pd inspired by Todd Barton’s self-generating patch on the Buchla Synthesizer.

In my regular journeys across the internet, I came across the concept of a “Krell Music” patch–a self-generating patch created by Todd Barton, inspired by Bebe and Louis Barron’s soundtrack to the 1956 film “Forbidden Planet.” The Barrons’ soundtrack to the film is amazing, and a bit beyond what I can get into here (see links below). Barton’s Buchla patch tries to capture some of the dynamic timbres of that score.

My oversimplification of the idea is this: a note has an amplitude envelope–attack and release–and when that amplitude envelope ends it triggers the next envelope. At the same time, that trigger selects a new (likely different) attack and decay time, as well as a new pitch and timbre for the next note. So we create a continuous series of musical tones, each distinct from the one before it.

Pure Data Algorithmic Chiptunes (Pd to ArduinoBoy to Game Boy)

Pd running MIDI to an ArduinoBoy controlling a Game Boy running trash80’s mGB software to generate triumphant RPG music in real time.

This simple(-ish) Pure Data patch generates four channels of MIDI, corresponding with the four channels of the Game Boy’s sound: two pulse waves (channels 1&2), a triangle wave (channel 3), and noise (channel 4).

The arpeggio on pulse channel 2 is just a simple sequencer, with some “echos” created with [pipe] objects. The “drums” are created by a sequencer triggering random notes on a sequence too.

The remaining channels are slightly more sophisticated. First, we select a rhythm for each measure, then trigger notes on pulse channel 1 at that rhythm. There are only five notes (from a hemitonic pentatonic scale), and each note has two or three possible harmony notes, to be played by the triangle channel.

Pure Data Tutorials for Musicians

Over the last year, I’ve put together a collection of YouTube videos on Pure Data Vanilla for musicians with no previous programming experience required.

Originally, I was just making these videos for a class, but I quickly found there was an audience for Pd tutorials like this, and my videos expanded beyond the class materials to generative music patches, live databending glitch beats, and algorithmic 80s synthwave.

If any of that sounds like fun to you, check out the playlist and enjoy!

Generative Ambient Music with the Logic Pro X Scripter

I put together a short tutorial on a simple way to use the Logic Pro X “Scripter” MIDI FX to create ever-changing, generative music.

As a composer, I always want to have original background music for all of my videos, but this means that I have to keep churning out long ambient tracks. One way that I address this is to set up a system that will generate an infinite amount of music for me, “Generative Music”, created by a system of rules.

In this video, I show one strategy of how to do this, laying down a couple chords in Logic, and then randomizing different aspects of them with MIDI FX to create an extended generative track.

Pure Data Horrors (Generative Halloween Music in Pure Data)

Make a Pure Data patch that generates synth Halloween music–“dissonant music in odd time signatures.”

Horror music offers a great deal of creative license, and there is no one-size-fits-all solution to spooky music. In this video I go through a few examples, then talk about how we can make a simple generative music system that creates pulsed, dissonant, repetitive music like John Carpenter’s score to Halloween (1978) or Mike Oldfield’s “Tubular Bells” (which became the theme to The Exorcist 1973). We start by making a simple sequencer, and then randomize and automate different aspects of it (tempo, roots, sequences).

A quick disclaimer, in retrospect, I realize I played a little fast and loose with the order of how things are processed here (looking especially at how I’m adding things), and I might have done some things in a different way, but everything works for our purposes, and I’ll plan to talk about that more next time.

Pd for Airports (Ambient Music in Pure Data)

Brian Eno coined the term “ambient music” to describe music that is “intended to induce calm and a space to think,” and “as ignorable as it is interesting.” We can make a simple patch in Pd that recreates one of Eno’s techniques, creating a system that endlessly generates ambient music for us with the notes that we choose.

Give it a try and make your own interesting and ignorable music.

Check out Tero Parviainen’s introduction on “How Generative Music Works” for more demonstrations and ideas.