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

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.

WATCH THOSE LEVELS!
It gets loud in the middle.

More no-talking Pd videos here.
More music and sound design with 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

Pure Data Patch from Scratch: “Complex Oscillator”

A quick and easy Pure Data patch-from-scratch tutorial building a “complex oscillator” with two sine waves cross modulating each others frequency for noisy, sophisticated sounds.

In this patch, we set up a simple FM synthesizer with one sine wave modulating another’s frequency. Then, instead of leaving it there, we take our output and use it to modulate the modulation oscillation, leading some wonderful, unpredictable complex sounds.

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

0:00 Sine Oscillator
0:42 Simple FM Synthesis
1:50 Cross Modulation
2:37 Commenting the Code
4:11 Exploring the Controls

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

Open Sound Control (OSC) in Pure Data Vanilla

How to receive and parse OSC (Open Sound Control) messages in Pure Data Vanilla for real-time musical control.


Open Sound Control, like MIDI is a protocol for transmitting data for musical performance. Unlike MIDI, though, OSC data is transmitted over a network, so we can easily transmit wirelessly from our iPhones or other devices. Another, difference, though, is that OSC messages don’t have standard designations (like MIDI “Note On” or “Note Off”), so we need to set up ways to parse that data and map it to controls ourselves.

Here, I go over the basics of receiving and parsing OSC data in Pure Data Vanilla, setting us up to make our own data-driven instruments.

0:00 Intro
2:46 [netreceive]
4:07 Sending OSC Messages
5:28 [oscparse]
6:02 Data!
7:11 [list trim]
8:09 [route]
9:03 [unpack]
9:46 Using the Data for Musical Control
13:52 Recap (Simplified Patch)
14:55 Explanation of Opening Patch

More Pure Data tutorials here.

Pure Data Patch from Scratch: Simple FM Synthesis Sequencer

A quick and easy Pure Data patch-from-scratch tutorial building a sequencer that plays dynamically changing timbres for each note though frequency modulation synthesis.

In this patch, we set up a simple sequence of sine wave pitches (frequencies), then a sequence of modulation frequencies of a different length, then a random patterns of deviations, creating a constantly changing series of sounds.

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

0:00 Sequencing the pitch of a sine wave
1:23 Creating modulation oscillator sequence
2:45 Randomizing the deviation
3:15 Audio math: modulator frequency
3:51 Audio math: deviation
4:09 Audio math: FM synthesis
4:31 Tweaking the numbers
4:52 Commenting the code
5:47 Adding delay (as usual)
6:55 Feedback for the delay
7:17 Listening and more tweaking numbers

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

Pd Patch from Scratch: Ring Modulation and Filterbank

A quick and easy Pure Data patch-from-scratch tutorial building another feedback loop with a delay and a ring modulator, this time with a fixed filter bank.

Inspired by the music of Jaap Vink, with three sine waves, a filterbank, a delay, and some feedback, we can make some slow evolving-complex and dynamic sounds.

In this patch we take a sine wave, ring modulate it, then ring modulate that result before running into a filterbank, delay, and then feeding it back on itself.

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

More feedback loops (in analog):

Subharmonics in Pure Data

Quick and easy Pure Data tutorial, making chords from subharmonics (like the Moog subharmonicon). The result is a kind of Coltrane-y generative music system.

Subharmonics are whole-number divisions of a frequency (as opposed to regular harmonics, which are whole-number multiples of a frequency). The resulting “subharmonic series” (or “undertone series”) is an inversion of the overtone series, with subharmonics getting closer the lower (i.e. higher division) that they are. Played together, these harmonics create harmonies quite distinct from those created with overtones.

I go up to the 9th subharmonic here, but of course you can just keep going.

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

More Pd Tutorials Here

Asymmetrical Clipping in Pure Data

Asymmetrical clipping is clipping (truncation of a waveform), where the positive and negative amplitude peaks of a waveform are clipped to different values. This means we could clip the negative at -1, and the positive at -0.8 for example, and create some interesting harmonics.

This asymmetrical clipping is common in guitar effect pedals, since it’s relatively cheap to accomplish in electronics (with a few diodes). Unsurprisingly, it’s pretty easy to accomplish in Pd too, just using the [clip~] object. The fun part comes in deciding how we can use it musically.