Tone.js/Tone/signal/Multiply.js
2014-06-15 17:38:59 -04:00

26 lines
655 B
JavaScript

///////////////////////////////////////////////////////////////////////////////
//
// MULTIPLY
//
// Multiply the incoming signal by a factor
///////////////////////////////////////////////////////////////////////////////
define(["Tone/core/Tone", "Tone/signal/Signal"], function(Tone){
//@param {number} value
Tone.Multiply = function(value){
this.input = this.context.createGain();
this.output = this.input;
this.input.gain.value = value;
};
Tone.extend(Tone.Multiply);
//set the constant value
//@param {number} value
Tone.Multiply.prototype.setValue = function(value){
this.input.gain.value = value;
};
return Tone.Multiply;
});