Effects

Effects can be added to any oscillator or synth. At this moment, all effects are inserts; I hope to add effects busses in the near future. Effects are stored in a JavaScript array, however, the array has some extra methods added to it that make it easier to manage the fx chain. Below is an example of adding / removing various effects:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
s = Synth();
seq = Seq(["A4", "D4", "E4", "B4"], _4);
seq.slave(s);
 
// add one or many fx at the same time
s.fx.add( Trunc(5) );
s.fx.add( Delay(_16), Reverb() );
 
// remove a named effect
s.fx.remove("Trunc");
 
// create an effect as a variable and insert at a certain position
r = Ring();
s.fx.insert(r, 0);
 
// remove fx at a certain position
s.fx.remove(0);
 
//remove all fx
s.fx.remove();
view raw gibber_fx.js This Gist brought to you by GitHub.

A brief description of all effects is found below.


BitCrush

Parameters: bitResolution = 8, mix = 1
Usage: s.fx.add( Trunc(6) );

Truncates the bits of samples entering the effect. By default it will reduce samples to 8-bits and you will only hear the effect output.


Delay

Parameters: delayTime = _4, feedback = .3, mix = .3
Usage: s.fx.add( Delay(_8, .5) );

A simple echo effect. The delayTime controls the amount of time between each echo and is measured in samples; you can also use the various rhythmic variables (_4, _8, _16 etc.) Feedback determines how much of the delayed signal is fed back into the delay effect itself; this determines how many echoes you will hear.


Distortion

Parameters: gain = _4, masterVolume = 1
Usage: s.fx.add( Dist(8) );

This effect creates distortion modeled on the TubeScreamer stompbox.


Low Pass Filter

Parameters: cutoff = 300, resonance = 3
Usage: s.fx.add( LPF(440, 10) );

A low-pass filter with variable cutoff frequency and resonance.


Ring Modulator

Parameters: frequency = 440, amount = .15
Usage: s.fx.add( Ring(440, .25) );

Simple ring modulation using a sine wave oscillator to generate sum and difference sidebands.


Reverb

Parameters: roomSize = .8, damping = .3, wet = .75, dry = .5
Usage: s.fx.add( Reverb(.1, .1) );

Reverb based on the Freeverb algorithm. Damping attenuates high frequency content.

This work is licensed under GPL - 2009 | Powered by Wordpress using a heavily modified version of the theme aav1