2014-04-16 20:47:25 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// MULTIPLY
|
|
|
|
//
|
|
|
|
// Multiply the incoming signal by a factor
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-04-16 23:56:18 +00:00
|
|
|
define(["Tone/core/Tone", "Tone/signal/Signal"], function(Tone){
|
2014-04-16 20:47:25 +00:00
|
|
|
|
2014-04-16 23:56:18 +00:00
|
|
|
//@param {number} value
|
|
|
|
Tone.Multiply = function(value){
|
2014-06-15 21:38:59 +00:00
|
|
|
this.input = this.context.createGain();
|
|
|
|
this.output = this.input;
|
2014-04-16 23:56:18 +00:00
|
|
|
this.input.gain.value = value;
|
2014-06-15 21:38:59 +00:00
|
|
|
};
|
2014-04-16 20:47:25 +00:00
|
|
|
|
|
|
|
Tone.extend(Tone.Multiply);
|
|
|
|
|
|
|
|
//set the constant value
|
2014-04-16 23:56:18 +00:00
|
|
|
//@param {number} value
|
|
|
|
Tone.Multiply.prototype.setValue = function(value){
|
|
|
|
this.input.gain.value = value;
|
2014-06-15 21:38:59 +00:00
|
|
|
};
|
2014-04-16 20:47:25 +00:00
|
|
|
|
|
|
|
return Tone.Multiply;
|
2014-06-15 21:38:59 +00:00
|
|
|
});
|