Tone.js/src/effects/FeedbackDelay.js

22 lines
622 B
JavaScript
Raw Normal View History

2014-03-11 23:27:46 +00:00
///////////////////////////////////////////////////////////////////////////////
//
// FEEDBACK DELAY
//
///////////////////////////////////////////////////////////////////////////////
//@param {number} delayTime
2014-03-16 17:33:56 +00:00
Tone.FeedbackDelay = function(delayTime){
Tone.FeedbackEffect.call(this);
2014-03-11 23:27:46 +00:00
this.delay = this.context.createDelay(4);
this.delay.delayTime.value = this.defaultArg(delayTime, .25);
2014-03-11 23:27:46 +00:00
//connect it up
this.connectEffect(this.delay);
}
2014-03-16 17:33:56 +00:00
Tone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);
2014-03-11 23:27:46 +00:00
2014-03-16 17:33:56 +00:00
Tone.FeedbackDelay.prototype.setDelayTime = function(delayTime){
2014-03-11 23:27:46 +00:00
this.rampToValue(this.delay.delayTime, delayTime);
}