Autoregressive Multi-Layer Perceptron - A neural network UGen for experimental sound synthesis in SuperCollider.
ARMLP is a small neural network that learns online at audio rate. The network continuously adapts to predict the input signal, and the learning dynamics themselves become part of the sonic output.
Requires SuperCollider source (for headers) and CMake 3.12+.
cd ARMLP
mkdir build && cd build
cmake -DSC_PATH=/path/to/supercollider ..
make
make installOr use the build script:
export SC_PATH=/path/to/supercollider
./build.shUniversal binary (default):
cmake -DSC_PATH=/path/to/supercollider ..Apple Silicon only:
cmake -DSC_PATH=/path/to/supercollider -DCMAKE_OSX_ARCHITECTURES=arm64 ..Intel only:
cmake -DSC_PATH=/path/to/supercollider -DCMAKE_OSX_ARCHITECTURES=x86_64 ..cmake -DSC_PATH=/path/to/supercollider -DSUPERNOVA=ON ..- Linux:
~/.local/share/SuperCollider/Extensions/ARMLP - macOS:
~/Library/Application Support/SuperCollider/Extensions/ARMLP
After installing, recompile the class library in SuperCollider.
// Basic
{ ARMLP.ar(SinOsc.ar(100) * 0.3) ! 2 }.play;
// With parameters
(
{
var sig = Saw.ar(80) * 0.25;
ARMLP.ar(sig,
size: 12,
width: 6,
learnRate1: 0.02,
learnRate2: 0.03,
act1: 0.5,
sineFac: 2.5
) ! 2
}.play
)See ARMLP.help for full documentation.
| Parameter | Description |
|---|---|
input |
Audio input |
size |
Multi-scale buffer length (fixed) |
width |
Hidden layer neurons (fixed) |
epochs |
Training iterations per sample |
learnRate1 |
Hidden layer learning rate |
learnRate2 |
Output layer learning rate |
ridge |
L2 regularization |
act1 |
Hidden activation (0=tanh, 1=sin, >1=softplus) |
act2 |
Output activation |
sineFac |
Sin frequency multiplier |
momentum |
Gradient momentum |
errorMode |
0=L2, 1=L1, 2=Huber |
gradNoise |
Gradient noise scale |
recurrent |
Hidden state feedback (not trained) |
maxWeight |
Weight clipping |
reset |
Trigger to reset weights |
GPL-3.0