diff --git a/Tone/component/CrossFade.js b/Tone/component/CrossFade.js index 83affa34..6872e43d 100644 --- a/Tone/component/CrossFade.js +++ b/Tone/component/CrossFade.js @@ -10,7 +10,11 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr", "Tone/signal * @param {NormalRange} [initialFade=0.5] * @example * var crossFade = new Tone.CrossFade(0.5); + * //connect effect A to crossfade from + * //effect output 0 to crossfade input 0 * effectA.connect(crossFade, 0, 0); + * //connect effect B to crossfade from + * //effect output 0 to crossfade input 1 * effectB.connect(crossFade, 0, 1); * crossFade.fade.value = 0; * // ^ only effectA is output diff --git a/Tone/component/EQ3.js b/Tone/component/EQ3.js index b4c2aedb..fa5bdd4d 100644 --- a/Tone/component/EQ3.js +++ b/Tone/component/EQ3.js @@ -3,8 +3,8 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/signal/Signal"] "use strict"; /** - * @class A 3 band EQ with control over low, mid, and high gain as - * well as the low and high crossover frequencies. + * @class EQ3 is a three band EQ with control over low, mid, and high gain as + * well as the low and high crossover frequencies. * * @constructor * @extends {Tone} diff --git a/Tone/component/Follower.js b/Tone/component/Follower.js index 7701a6a4..d41a516d 100644 --- a/Tone/component/Follower.js +++ b/Tone/component/Follower.js @@ -5,11 +5,14 @@ function(Tone){ "use strict"; /** - * @class A crude envelope follower which will follow the amplitude - * of the incoming signal. - * Careful with small (< 0.02) attack or decay values. - * The follower has some ripple which gets exaggerated - * by small values. + * @class Follower is a crude envelope follower which will follow + * the amplitude of an incoming signal. + * Take care with small (< 0.02) attack or decay values + * as follower has some ripple which is exaggerated + * at these values. More on envelop followers (also known + * as envelope detectors) on + * Wikipedia. * * @constructor * @extends {Tone} @@ -153,8 +156,8 @@ function(Tone){ }); /** - * borrows the connect method from Signal so that the output can be used - * as a control signal {@link Tone.Signal} + * Borrows the connect method from Signal so that the output can be used + * as a Tone.Signal control signal. * @function */ Tone.Follower.prototype.connect = Tone.Signal.prototype.connect; diff --git a/Tone/component/Gate.js b/Tone/component/Gate.js index 13043dea..0e5a4530 100644 --- a/Tone/component/Gate.js +++ b/Tone/component/Gate.js @@ -3,9 +3,12 @@ define(["Tone/core/Tone", "Tone/component/Follower", "Tone/signal/GreaterThan"], "use strict"; /** - * @class Only pass signal through when it's signal exceeds the - * specified threshold. Uses a Tone.Follower to follow the - * amplitude of the incoming signal. + * @class Tone.Gate only passes a signal through when the incoming + * signal exceeds a specified threshold. To do this, Gate uses + * a Tone.Follower to follow the amplitude of the incoming signal. + * A common implementation of this class is a + * + * Noise Gate. * * @constructor * @extends {Tone} diff --git a/Tone/component/Limiter.js b/Tone/component/Limiter.js index 40830e40..2de5e5c1 100644 --- a/Tone/component/Limiter.js +++ b/Tone/component/Limiter.js @@ -3,8 +3,12 @@ define(["Tone/core/Tone", "Tone/component/Compressor"], function(Tone){ "use strict"; /** - * @class Limit the loudness of the incoming signal. Composed of a Tone.Compressor - * with a fast attack and release. + * @class Tone.Limiter will limit the loudness of an incoming signal. + * It is composed of a Tone.Compressor with a fast attack + * and release. Limiters are commonly used to safeguard against + * signal clipping. Unlike a compressor, limiters do not provide + * smooth gain reduction and almost completely prevent + * additional gain above the threshold. * * @extends {Tone} * @constructor diff --git a/Tone/component/Merge.js b/Tone/component/Merge.js index 4a6f4ed4..2a46b8e9 100644 --- a/Tone/component/Merge.js +++ b/Tone/component/Merge.js @@ -3,15 +3,20 @@ define(["Tone/core/Tone"], function(Tone){ "use strict"; /** - * @class Merge two signals into the left and right - * channels of a single, stereo channel. + * @class Tone.Merge brings two signals into the left and right + * channels of a single stereo channel. * * @constructor * @extends {Tone} * @example - * var merge = new Tone.Merge(); - * sigLeft.connect(merge.left); - * sigRight.connect(merge.right); + * var merge = new Tone.Merge().toMaster(); + * //routing a sine tone in the left channel + * //and noise in the right channel + * var osc = new Tone.Oscillator().connect(merge.left); + * var noise = new Tone.Noise().connect(merge.right); + * //starting our oscillators + * noise.start(); + * osc.start(); */ Tone.Merge = function(){ diff --git a/Tone/component/Meter.js b/Tone/component/Meter.js index 48b7648b..cda52efc 100644 --- a/Tone/component/Meter.js +++ b/Tone/component/Meter.js @@ -3,19 +3,29 @@ define(["Tone/core/Tone", "Tone/core/Master"], function(Tone){ "use strict"; /** - * @class Get the RMS - * of the input signal with some averaging. Can also get the raw value of the signal - * or the value in dB. inspired by - * Chris Wilsons Volume Meter - *

- * Note that for signal processing, it's better to use Tone.Follower which will produce - * an audio-rate envelope follower instead of needing to poll the Meter to get the output. + * @class Tone.Meter gets the RMS of an input signal with some averaging applied. + * It can also get the raw value of the signal or the value in dB. For signal + * processing, it's better to use Tone.Follower which will produce an audio-rate + * envelope follower instead of needing to poll the Meter to get the output. + *

+ * Meter was inspired by + * Chris Wilsons Volume Meter * * @constructor * @extends {Tone} * @param {number} [channels=1] number of channels being metered * @param {number} [smoothing=0.8] amount of smoothing applied to the volume * @param {number} [clipMemory=0.5] number in seconds that a "clip" should be remembered + * @example + * var meter = new Tone.Meter(); + * var mic = new Tone.Microphone().start(); + * //connect mic to the meter + * mic.connect(meter); + * //use getLevel or getDb + * //to access meter level + * meter.getLevel(); */ Tone.Meter = function(channels, smoothing, clipMemory){ //extends Unit diff --git a/Tone/component/Mono.js b/Tone/component/Mono.js index b7df6661..1d227ce4 100644 --- a/Tone/component/Mono.js +++ b/Tone/component/Mono.js @@ -3,8 +3,10 @@ define(["Tone/core/Tone", "Tone/component/Merge"], function(Tone){ "use strict"; /** - * @class Coerces the incoming mono or stereo signal into a mono signal - * where both left and right channels have the same value. + * @class Tone.Mono coerces the incoming mono or stereo signal into a mono signal + * where both left and right channels have the same value. This is useful + * for + * stereo imaging. * * @extends {Tone} * @constructor diff --git a/Tone/component/PanVol.js b/Tone/component/PanVol.js index c23ce9b6..c6750a10 100644 --- a/Tone/component/PanVol.js +++ b/Tone/component/PanVol.js @@ -3,7 +3,7 @@ define(["Tone/core/Tone", "Tone/component/Panner", "Tone/component/Volume"], fun "use strict"; /** - * @class A Tone.Panner and Tone.Volume in one. + * @class Tone.PanVol is a Tone.Panner and Tone.Volume in one. * * @extends {Tone} * @constructor diff --git a/Tone/component/Panner.js b/Tone/component/Panner.js index 2ba9d5c9..f6d2f52a 100644 --- a/Tone/component/Panner.js +++ b/Tone/component/Panner.js @@ -5,7 +5,8 @@ function(Tone){ "use strict"; /** - * @class Equal power Left/Right Panner. Not 3D. Uses the StereoPannerNode when available. + * @class Tone.Panner is an equal power Left/Right Panner and does not + * support 3D. Panner uses the StereoPannerNode when available. * * @constructor * @extends {Tone} diff --git a/Tone/component/ScaledEnvelope.js b/Tone/component/ScaledEnvelope.js index 3efd86e9..61526d6e 100644 --- a/Tone/component/ScaledEnvelope.js +++ b/Tone/component/ScaledEnvelope.js @@ -4,9 +4,10 @@ define(["Tone/core/Tone", "Tone/component/Envelope", "Tone/signal/Scale"], "use strict"; /** - * @class An envelope which can be scaled to any range. - * Useful for applying an envelope to a frequency or - * any other non-NormalRange signal parameter. + * @class Tone.ScaledEnvelop is an envelope which can be scaled + * to any range. It's useful for applying an envelope + * to a frequency or any other non-NormalRange signal + * parameter. * * @extends {Tone.Envelope} * @constructor diff --git a/Tone/component/Split.js b/Tone/component/Split.js index fe6b6380..9bd3d864 100644 --- a/Tone/component/Split.js +++ b/Tone/component/Split.js @@ -3,7 +3,7 @@ define(["Tone/core/Tone"], function(Tone){ "use strict"; /** - * @class Split the incoming signal into left and right channels. + * @class Tone.Split splits an incoming signal into left and right channels. * * @constructor * @extends {Tone} diff --git a/Tone/component/Volume.js b/Tone/component/Volume.js index 0f14716c..d705787f 100644 --- a/Tone/component/Volume.js +++ b/Tone/component/Volume.js @@ -3,7 +3,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/core/Master"], function(To "use strict"; /** - * @class A simple volume node. Useful for creating a volume fader. + * @class Tone.Volume is a simple volume node, useful for creating a volume fader. * * @extends {Tone} * @constructor