2014-03-11 23:27:46 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// FEEDBACK DELAY
|
|
|
|
//
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-04-06 04:12:18 +00:00
|
|
|
define(["core/Tone", "effects/FeedbackEffect"], function(Tone){
|
2014-03-11 23:27:46 +00:00
|
|
|
|
2014-04-06 04:12:18 +00:00
|
|
|
//@param {number} delayTime
|
|
|
|
Tone.FeedbackDelay = function(delayTime){
|
|
|
|
Tone.FeedbackEffect.call(this);
|
2014-03-11 23:27:46 +00:00
|
|
|
|
2014-04-06 04:12:18 +00:00
|
|
|
this.delay = this.context.createDelay(4);
|
|
|
|
this.delay.delayTime.value = this.defaultArg(delayTime, .25);
|
2014-03-11 23:27:46 +00:00
|
|
|
|
2014-04-06 04:12:18 +00:00
|
|
|
//connect it up
|
|
|
|
this.connectEffect(this.delay);
|
|
|
|
}
|
2014-03-11 23:27:46 +00:00
|
|
|
|
2014-04-06 04:12:18 +00:00
|
|
|
Tone.extend(Tone.FeedbackDelay, Tone.FeedbackEffect);
|
|
|
|
|
|
|
|
Tone.FeedbackDelay.prototype.setDelayTime = function(delayTime){
|
|
|
|
this.rampToValue(this.delay.delayTime, delayTime);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Tone.FeedbackDelay;
|
|
|
|
});
|