mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 16:48:00 +00:00
26 lines
655 B
JavaScript
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;
|
|
});
|