Guide

MIRLCa-web is a live-coding system based around sampling and music information retrieval techniques. It's split into two modes:

To start, click the "Start audio" button on the top right corner of the window.

Training Mode

MIRLCa-web is split into two "modes": training mode and performance mode. In training mode, you listen to sounds from Freesound and rate them good/bad. This process is then used to train a classifier that will be used to pick good sounds during performance mode.

Playing sounds

To choose a sound to listen to, click either "Random", "Similar", or "Tag".

Rating sounds

Rate a sound by clicking either good or bad. You can also click skip if you don't want to rate it (and therefore don't add it to the dataset). After clicking good/bad/skip, another sound will start playing immediately. This will continue until you click "stop". After clicking "stop" you can try a different search method.

Once you have rated a bunch of sounds, click "train" to train the classifier.

Saving/loading data

You can also save your ratings data with the "save" button and load them again by clicking "load". You can load a dataset you've been working on from a previous session, add to it by rating more sounds, then save it again.

At the moment there is no way of editing the ratings (e.g. changing a rating or removing values), but because the data is saved in the JSON format, it should fairly easy to directly edit the file then re-upload it.

Performance Mode

The performance mode page contains two windows. The code editor on the left, and the output console on the right. MIRLCa-web is programmed using JavaScript. MIRLCa-web allows you to retrieve sounds, sequence them, manipulate them, and apply effects.

Executing code

Press Ctrl-Shift-Enter to run the code. This is will either execute the line that the cursor is currently on, or a region of code if you selected a region of text (with the mouse or using shift and the arrow keys).

Keybindings

Global Functions

Groups

Sounds and FX are held within Group objects. Groups make it possible to apply effects and processing to several sounds at once.

Retrieving sounds

There are several methods on the Group class for finding new sounds. In each case a sound is found and immediately played and looped:

The rest of the methods for getting sounds requires that you train the classifier first (see Training Mode), as they all pick "good" sounds.

Examples

Create a group and load a random sound:

x = Group(); // Create a group
x.rand(); // Load and play a random sound.

Load a sound that's similar to currently playing one:

x.similar();

Load a sound by supplying a tag:

x.tag("water");

Load a sound that has BPM 120, tag "snare", and is less than 5 seconds long:

x.filter({ bpm: 120, tag: "snare", duration: "[0 TO 5]" });

Manipulating sounds

The sounds within a group can be modified in a few different ways. rate(), vol(), and muteAll() affect all the sounds in the group.

The following methods apply to a particular sound within a group. They each take a single parameter that specifies the index of the sound of interest (starting from 0). If no parameter is supplied, the most recent sound in the group will be chosen. You can also use negative indicies to count backwards from the most recent.

Examples:

x.info() // Print some information about the last sound in the group.
x.mute(2) // Mute the 3rd sound in the group.
x.drop(-2) // Delete the second most recent sound in the group.

Effects

Each group contains an FX chain, held in the fx property. All the effects based methods are called on this property. For example, to add a reverb:

x = Group();
x.fx.add("reverb");

The add method also returns the FX object, allowing you to adjust its parameters using method chaining. For example, to add a delay and adjust the delay time and feedback length:

x.fx.add("delay").time(0.5).fb(0.9);

To modify or delete an existing effect, refer to it by name:

x.fx.drop("reverb"); // Delete the reverb effect from the chain.
x.fx.get("delay").time(0.1); // Adjust the delay time.

You can also bypass the entire FX chain using the bypass() method.

Each effect contains a wet() method to adjust the wet/dry ratio. By default, it is set to 0.5.

Filters

Each filter has the freq() method to adjust the cutoff frequency.

Delay-based effects

Sequences

By default, sounds are played on a loop dependent on the length of the sound. To play the sounds in a rhythm against the shared tempo, use the seq method on a group.

seq accepts a string that specifies the pattern, and an optional index. The index determines which sound the pattern should be applied to. If you leave it blank, it will target the most recently added sound in the group.

Patterns can either contain an 'x' or a '-', where 'x' means play the sound, '-' means rest. The patterns can also be nested by enclosing them in square brackets.

For example, to sequence the third sound in group x:

x.seq("x-[xx]--x--", 2);

To set the global BPM, use the setBPM function. The BPM only effects sounds playing in a sequence.