Skip to content
lucdoebereinerPublic

About

Autoregressive Multi-Layer Perceptron - A neural network UGen for experimental sound synthesis in SuperCollider.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

ARMLP

Autoregressive Multi-Layer Perceptron - A neural network UGen for experimental sound synthesis in SuperCollider.

Overview

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.

Building

Requires SuperCollider source (for headers) and CMake 3.12+.

cd ARMLP
mkdir build && cd build
cmake -DSC_PATH=/path/to/supercollider ..
make
make install

Or use the build script:

export SC_PATH=/path/to/supercollider
./build.sh

macOS architectures

Universal 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 ..

Supernova

cmake -DSC_PATH=/path/to/supercollider -DSUPERNOVA=ON ..

Install locations

  • Linux: ~/.local/share/SuperCollider/Extensions/ARMLP
  • macOS: ~/Library/Application Support/SuperCollider/Extensions/ARMLP

After installing, recompile the class library in SuperCollider.

Usage

// 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.

Parameters

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

License

GPL-3.0

About

Autoregressive Multi-Layer Perceptron - A neural network UGen for experimental sound synthesis in SuperCollider.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages