mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
parent
6af9f28c50
commit
72200b530f
1 changed files with 6 additions and 7 deletions
|
@ -1,15 +1,15 @@
|
||||||
define(["Tone/core/Tone", "Tone/component/LFO", "Tone/effect/StereoXFeedbackEffect", "Tone/core/Delay"], function(Tone){
|
define(["Tone/core/Tone", "Tone/component/LFO", "Tone/effect/StereoEffect", "Tone/core/Delay"], function(Tone){
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class Tone.Chorus is a stereo chorus effect with feedback composed of
|
* @class Tone.Chorus is a stereo chorus effect composed of
|
||||||
* a left and right delay with a Tone.LFO applied to the delayTime of each channel.
|
* a left and right delay with a Tone.LFO applied to the delayTime of each channel.
|
||||||
* Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).
|
* Inspiration from [Tuna.js](https://github.com/Dinahmoe/tuna/blob/master/tuna.js).
|
||||||
* Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).
|
* Read more on the chorus effect on [SoundOnSound](http://www.soundonsound.com/sos/jun04/articles/synthsecrets.htm).
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {Tone.StereoXFeedbackEffect}
|
* @extends {Tone.StereoEffect}
|
||||||
* @param {Frequency|Object} [frequency] The frequency of the LFO.
|
* @param {Frequency|Object} [frequency] The frequency of the LFO.
|
||||||
* @param {Milliseconds} [delayTime] The delay of the chorus effect in ms.
|
* @param {Milliseconds} [delayTime] The delay of the chorus effect in ms.
|
||||||
* @param {NormalRange} [depth] The depth of the chorus.
|
* @param {NormalRange} [depth] The depth of the chorus.
|
||||||
|
@ -21,7 +21,7 @@ define(["Tone/core/Tone", "Tone/component/LFO", "Tone/effect/StereoXFeedbackEffe
|
||||||
Tone.Chorus = function(){
|
Tone.Chorus = function(){
|
||||||
|
|
||||||
var options = Tone.defaults(arguments, ["frequency", "delayTime", "depth"], Tone.Chorus);
|
var options = Tone.defaults(arguments, ["frequency", "delayTime", "depth"], Tone.Chorus);
|
||||||
Tone.StereoXFeedbackEffect.call(this, options);
|
Tone.StereoEffect.call(this, options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the depth of the chorus
|
* the depth of the chorus
|
||||||
|
@ -103,7 +103,7 @@ define(["Tone/core/Tone", "Tone/component/LFO", "Tone/effect/StereoXFeedbackEffe
|
||||||
this.spread = options.spread;
|
this.spread = options.spread;
|
||||||
};
|
};
|
||||||
|
|
||||||
Tone.extend(Tone.Chorus, Tone.StereoXFeedbackEffect);
|
Tone.extend(Tone.Chorus, Tone.StereoEffect);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @static
|
* @static
|
||||||
|
@ -113,7 +113,6 @@ define(["Tone/core/Tone", "Tone/component/LFO", "Tone/effect/StereoXFeedbackEffe
|
||||||
"frequency" : 1.5,
|
"frequency" : 1.5,
|
||||||
"delayTime" : 3.5,
|
"delayTime" : 3.5,
|
||||||
"depth" : 0.7,
|
"depth" : 0.7,
|
||||||
"feedback" : 0.1,
|
|
||||||
"type" : "sine",
|
"type" : "sine",
|
||||||
"spread" : 180
|
"spread" : 180
|
||||||
};
|
};
|
||||||
|
@ -195,7 +194,7 @@ define(["Tone/core/Tone", "Tone/component/LFO", "Tone/effect/StereoXFeedbackEffe
|
||||||
* @returns {Tone.Chorus} this
|
* @returns {Tone.Chorus} this
|
||||||
*/
|
*/
|
||||||
Tone.Chorus.prototype.dispose = function(){
|
Tone.Chorus.prototype.dispose = function(){
|
||||||
Tone.StereoXFeedbackEffect.prototype.dispose.call(this);
|
Tone.StereoEffect.prototype.dispose.call(this);
|
||||||
this._lfoL.dispose();
|
this._lfoL.dispose();
|
||||||
this._lfoL = null;
|
this._lfoL = null;
|
||||||
this._lfoR.dispose();
|
this._lfoR.dispose();
|
||||||
|
|
Loading…
Reference in a new issue