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:

Patch from Scratch: Analog Feedback Loop in Eurorack

Patching up an analog feedback loop in Eurorack with some generic modules.

I don’t do a lot of videos talking about Eurorack for two main reasons:

(1) I’ve actually only been doing Eurorack for a couple years now, even though I’ve been doing digital synthesis and sound design for decades, and

(2) I don’t want my videos to be about any particular piece of hardware that you need to get (as always, I’m not sponsored by anyone).

But, the patch I put together in this video could be done by any number of modules, all I have is a sine wave, a ring modulator (multiplier), a reverb, a filter, and a limiter/compressor/saturator (anything to stop hard clipping). Put them together, feed them back, and you have some dynamic, analog generative soundscapes.

Previously, I’ve shown how to do the same thing in Pure Data, In Kyma, and in Reaktor.

Oh, and you can control it with an accelerometer too!

Ihatov MU (無) : Noise Music at the Hanamaki “English Coast”

Screaming noise improvisation on 54HP Eurorack at the peaceful Hanamaki “English Coast” (花巻イギリス海岸).

There’s a feedback loop going here with spring reverb and ring modulation, plus quite a bit of contribution from the After Later Audio Benjolin V2.

More “MU” on the Hanamaki English Coast:

Patch from Scratch: Reaktor Feedback Loop

Building a dynamic feedback loop in Reaktor 6 Primary.

Here’s a simple patch based off the work of composer/engineer Jaap Vink from the Institute For Sonology, Utrecht. This ensemble is a feedback loop with a delay, a ring modulator, and a saturator (with a simple sine as a “trigger” to get things started).

Each pass through the loop, the signal is delayed, then ring-modulated, significantly changing the spectrum. This can devolve into noise rather quickly, but a soft touch can lead to some interesting evolving soundscapes.

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

More Audio Cybernetics and Feedback:

Pure Data Artificial Neuron Patch from Scratch

Patching up an artificial neuron in Pure Data Vanilla for some nonlinear mixing. There’s no talking on this one, just building the patch, and listening to it go.

An artificial neuron is basically just a mixer: inputs come in, and are weighted differently, modelling the dendrites of a biological neuron; then the mixed signal is transformed by an “activation function”, usually nonlinear, and output, modelling the axon.

Now, we can say that “learning” occurs when we adjust the weights (levels) of the inputs based on the output, but let’s not do that here, let’s just revel in our our nonlinear mix.

More details in my blog post here

0:00 Nonlinear Mixing and Artificial Neurons
1:17 Adding “Bias”
2:28 Neuron Complete
3:27 Automating the Weights
7:09 Adding Feedback
8:42 Adding Noise
9:58 Commenting our Code
11:25 Trying the ReLU Activation Function
12:04 Linear Mixing (with Hard Clipping)

Pure Data introductory tutorials here
More no-talking Pure Data jams and patch-from-scratch videos

No-Input DAW (Logic Pro X Feedback Loops & Sound Design)

Tutorial on “no-input mixing” in a DAW (Logic Pro X, in this case) for wild feedback-based sound design.

With a little knowledge of digital signal flow, we can easily set up an aux track in our DAW as a feedback loop–sending the track back into itself. Once we start adding effects, we can achieve new and unexpected sounds. This technique could be a way to generate some new sonic material, add some interest to a drum loop, or even generate vast, evolving soundscapes.

0:00 Intro / Casio Beat
0:39 Output to Aux Track
1:06 Feeding Back with a Bus Send
2:20 Adding Effects to the Loop
4:14 More Subtle Effects
4:58 More Extreme (Pitch Shifter)
5:17 Removing the “Input”
6:47 Talking through the No-Input Mixer
8:18 Closing Thoughts

More Logic Pro X tutorials:

Pure Data Screaming Metal Feedback Loop

A simple digital feedback patch in Pure Data build from just delay, ring-modulation, and saturation.

Building on my digital feedback video from a few weeks ago, here’s a quick patch for setting up a dynamic controllable feedback loop in Pd Vanilla. I’ve set up a way to get things going with a little sine-wave beep, and you can hear that the feedback loop makes things pretty complex pretty quickly.

It gets loud in the middle.

More no-talking Pd videos here.
More music and sound design with cybernetics and feedback.

Audio Feedback Loops in Digital: Cybernetic Music in Symbolic Sound Kyma 7

Building some feedback loops in the digital domain using Symbolic Sound’s Kyma 7.

In audio feedback loops, the output of the system is fed back into an input. We’re probably most familiar with this when we put a microphone in front of a speaker and we get the “howling” sound. Here, though, I’m intentionally building digital feedback loops in order to explore the sonic possibilities of these rather unpredictable systems.

In order to keep my feedback loop interesting, though, I need to keep it from dying away to silence, or blowing up into white noise. By considering the different processes we apply to the audio in the loop (are they adding spectral complexity or removing it?), we can try to make feedback patches that are dynamic and interesting over time.

0:00 The Continuum of Spectral Complexity
3:13 Staring with an Sine Wave in Kyma
4:45 Delay with Feedback
5:49 Building Feedback Loops Manually
8:40 Ring-Modulating the Feedback
11:20 Gain and Saturation
14:22 Exploring the Sound
16:16 Filter Bank
19:05 Jamming with the Patch
22:18 Thinking about Control
23:25 Performing the Sound
26:34 Feedback Loop with Reverb
28:10 Making it into IDM with the Chopper
29:22 So What? Next Steps

More Kyma Videos:

More audio cybernetics and feedback:

Making a Bad Sine Wave in Pure Data Vanilla

Building a “wab-sabi” oscillator in Pd to celebrate the beauty of imperfection and impermanence.

Sine waves are great! The perfection of a pure, single frequency can be both expressively and technically very useful in pursuing our musical goals. There are, however, lots of musical reasons that we might want to intentionally make our oscillators a little more rough around the edges.

Performance on traditional, acoustic instruments, of course, produces a huge amount of micro-variation across each note, and so it can be expressively engaging for us to be able to introduce that same imperfection (analog warmth?) in our digital instruments as well.

In this video, I build a bad sine wave by frequency-modulating my oscillator with noise, and then feeding back the output back into the modulation. While I build this out in Pure Data, the same can be done in Reaktor, Kyma, Max/MSP or any other synthesis environment.

More Pd Tutorials here.
No-talking Pure Data jams and patch-from-scratch.

0:00 Introduction, The Beauty of Imperfection
1:26 Slider-Controlled Sine Wave
3:28 Adding Noise
4:35 Frequency Modulating with Noise
7:24 Filtering the Noise
8:20 Feeding Back into FM
9:55 I’ve gone too far
13:26 Reaktor Examples
14:18 Closing Thoughts, Next Steps