mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
cleaning up PingPongDelay
This commit is contained in:
parent
30e71b1c82
commit
527ce958cf
1 changed files with 3 additions and 12 deletions
|
@ -43,19 +43,10 @@ function(Tone){
|
|||
*/
|
||||
this.delayTime = new Tone.Signal(0);
|
||||
|
||||
/**
|
||||
* double the delayTime
|
||||
* @type {Tone.Multiply}
|
||||
* @private
|
||||
*/
|
||||
this._half = new Tone.Multiply(1);
|
||||
|
||||
//connect it up
|
||||
this.chain(this.effectSendL, this._leftPreDelay, this._leftDelay, this.effectReturnL);
|
||||
this.chain(this.effectSendR, this._rightDelay, this.effectReturnR);
|
||||
|
||||
this.fan(this.delayTime, this._leftDelay.delayTime, this._rightDelay.delayTime, this._half);
|
||||
this._half.connect(this._leftPreDelay.delayTime);
|
||||
this.fan(this.delayTime, this._leftDelay.delayTime, this._rightDelay.delayTime, this._leftPreDelay.delayTime);
|
||||
//rearranged the feedback to be after the leftPreDelay
|
||||
this._feedbackRL.disconnect();
|
||||
this._feedbackRL.connect(this._leftDelay);
|
||||
|
@ -99,11 +90,11 @@ function(Tone){
|
|||
Tone.StereoXFeedbackEffect.prototype.dispose.call(this);
|
||||
this._leftDelay.disconnect();
|
||||
this._rightDelay.disconnect();
|
||||
this._half.dispose();
|
||||
this._leftPreDelay.disconnect();
|
||||
this.delayTime.dispose();
|
||||
this._leftDelay = null;
|
||||
this._rightDelay = null;
|
||||
this._half = null;
|
||||
this._leftPreDelay = null;
|
||||
this.delayTime = null;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue