Pd Machine Learning Fail

A failed attempt at machine learning for real-time sound design in Pure Data Vanilla.

I’ve previously shown artificial neurons and neural networks in Pd, but here I attempted to take things to the next step and make a cybernetic system that demonstrates machine learning. It went good, not great.

This system has a “target” waveform (what we’re trying to produce). The neuron takes in several different waveforms, combines them (with a nonlinearity), and then compares the result to the target waveform, and attempts to adjust accordingly.

While it fails to reproduce the waveform in most cases, the resulting audio of a poorly-designed AI failing might still hold expressive possibilities.

0:00 Intro / Concept
1:35 Single-Neuron Patch Explanation
3:23 The “Learning” Part
5:46 A (Moderate) Success!
7:00 Trying with Multiple Inputs
10:07 Neural Network Failure
12:20 Closing Thoughts, Next Steps

More music and sound with neurons and neural networks 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.