Tone.js/Tone/signal/Multiply.js

27 lines
655 B
JavaScript
Raw Normal View History

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