SOUL

SOUnd Language Patches

SOUL (SOUnd Language) is the latest project from Julian Storer, creator of the JUCE framework.

The SOUL project is creating a new language and infrastructure for writing and deploying audio code. It aims to unlock improvements in latency, performance, portability and ease-of-development that aren't possible with the current mainstream techniques that are being used.

SOUL is a platform for writing and running audio code, consisting of two elements: a language and a runtime. SOUL patches can be added to Sattern's main audio Graph object.

Let's add some code to our current project and add a reverb effect to our Sampler object. We'll first create a new SOULPatch object, add it to Sattern's main graph object, and connect our Sampler object's output to the SOULPatch object's input.

// main.js
// Arpeggiator
//
// Created by Jacob Sologub on 15 Jun 2020.
// Copyright © 2020 Jacob Sologub. All rights reserved.

const sampler = new sattern.Sampler();
sattern.graph.add (sampler);

const sound = new sattern.Sound ("./mcg_mp_064.wav", {
    lowKey: 0, highKey: 127, rootKey: 64
});
sampler.add (sound);

const reverb = new sattern.SOULPatch ("./Reverb.soulpatch");
sattern.graph.add (reverb);
sattern.graph.connect (sampler.output, reverb.input);

const pattern = new sattern.Pattern();
sattern.add (pattern);
pattern.onSequence = function (context) {
    return [64, 71, 68, 76].map (key => {
        return new sattern.Step ([sampler, new sattern.Note (key)], 4, 4)
    });
};

Line #15 creates a new reverb SOULPatch object, line #16 adds the newly created reverb object to Sattern's main graph, and line #17 connects the Sampler object's output channel(s) to the reverb object's input channel(s). Copy the above code snippet and replace the contents of your "main.js" file. Press Command + R or Command + S to save and re-load the current file.

You will probably see something like this inside the (9) "Output Console" tab.

[15:20:49.725] [error] Error: File at path 'Arpeggiator/Reverb.soulpatch' does not exist.
Error: File at path 'Arpeggiator/Reverb.soulpatch' does not exist.
    at main.js:15:16

That's because on line #15 we're loading the file "Reverb.soulpatch" that does not exist inside our project directory. Download the following ".zip" file and extract the contents to your Arpeggiator project's directory.

You should now have "Reverb.soulpatch" and "Reverb.soul" files inside your project folder. Press Command + R to save and re-load the current file.

Now hit a key on your midi keyboard or on the virtual (12) "MIDI Keyboard" inside the Sattern UI and you should hear the newly added reverb effect.

The SOUL Reverb patch is taken from https://soul.dev/lab/?id=Reverb and you can download it directly from here https://soul.dev/lab/?id=9698774311e36d77d30ce75323396b7c.

You can edit SOUL files directly inside Sattern by adding "Reverb.soulpatch" and "Reverb.soul" files to the project by either dragging the files on to the (8) "File Explorer" area or by right clicking anywhere inside the (8) "File Explorer" area and choosing the "Add Existing Files..." menu item.

Now that we've seen how to add Audio Units to Sattern's main audio graph, create pattern objects that return steps and how to quickly use SOUL to add a simple reverb effect to our sampler object let's move on to creating the Arpeggiator program.

Last updated