Guide
MIRLCa-web is a live-coding system based around sampling and music information retrieval techniques. It's split into two modes:
- Training mode: Where you train a classifier by listening to and rating sounds.
- Performance mode: A live-coding interface. The classifier trained in a training mode is used to help you find suitable sounds.
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".
- "Random": Play a completely random sound.
- "Similar": Play a sound that's similar to the previously rated one (not one that has been stopped or skipped).
- "Tag": Play a sound that matches a given Freesound tag (typed into the input box).
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
- Ctrl-Shift-Enter: Run the highlighted selection of code or the current line.
- Ctrl-Shift-.: Mute/unmute all the groups.
Global Functions
setBPM(): Set the global BPM (relevant when using theseqmethod).silence(): Mute/unmute all the groups.
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:
id(): Supply a specific Freesound ID.rand(): Get a random sound.
The rest of the methods for getting sounds requires that you train the classifier first (see Training Mode), as they all pick "good" sounds.
similar(): Get a sound that's similar to a currently playing one. This method takes an optionalindexparameter that specifies the sound to compare with (leaving this parameter out defaults to the most recent one).tag(): Get a sound by supplying a Freesound tag.filter(): Getting a sound by supplying a set of search filters. This method takes an object that contains key/value pairs. Each pair specifies a filter name (e.g. "pitch", "bpm", "duration") and a filter value. The full list of filter names are listed in this table and the table below it in the Freesound docs (those marked "yes" in the filtering column). With this method you can search using tags and username as well as acoustic descriptors like brightness or dynamic range.
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.
rate(): Supply a number to adjust the playback rate. A value of 1 plays the sounds at their original rate.vol(): Adjust the volume.muteAll(): Mute/unmute 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.
mute(): Mute/Unmute a sound.drop(): Delete a sound. This shifts indices of all the following sounds backwards.info(): Print some information about a particular sound to the console.
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
- "hpf": Highpass filter.
- "lpf": Lowpass filter.
- "bps": Bandpass filter.
Each filter has the freq() method to adjust the cutoff frequency.
Delay-based effects
- "reverb": A reverb.
- "bitcrush": Adjust the amount of bitcrushing with the
bits()method. - "distort": Adjust the amount of distortion with the
amt()method.
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.