mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 00:27:58 +00:00
classes which generate or process sound extend Tone.AudioNode
This commit is contained in:
parent
112b8081a7
commit
e6faa39dba
43 changed files with 572 additions and 571 deletions
|
@ -50,8 +50,6 @@ define(["Tone/core/Tone", "Tone/component/Envelope", "Tone/core/Gain"], function
|
|||
* @return {Tone.AmplitudeEnvelope} this
|
||||
*/
|
||||
Tone.AmplitudeEnvelope.prototype.dispose = function(){
|
||||
this.input.dispose();
|
||||
this.input = null;
|
||||
Tone.Envelope.prototype.dispose.call(this);
|
||||
return this;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone"], function (Tone) {
|
||||
define(["Tone/core/Tone", "Tone/core/AudioNode"], function (Tone) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -22,7 +22,7 @@ define(["Tone/core/Tone"], function (Tone) {
|
|||
* @class Wrapper around the native Web Audio's
|
||||
* [AnalyserNode](http://webaudio.github.io/web-audio-api/#idl-def-AnalyserNode).
|
||||
* Extracts FFT or Waveform data from the incoming signal.
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {String=} type The return type of the analysis, either "fft", or "waveform".
|
||||
* @param {Number=} size The size of the FFT. Value must be a power of
|
||||
* two in the range 32 to 32768.
|
||||
|
@ -30,7 +30,7 @@ define(["Tone/core/Tone"], function (Tone) {
|
|||
Tone.Analyser = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["type", "size"], Tone.Analyser);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The analyser node.
|
||||
|
@ -58,7 +58,7 @@ define(["Tone/core/Tone"], function (Tone) {
|
|||
this.type = options.type;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Analyser);
|
||||
Tone.extend(Tone.Analyser, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The default values.
|
||||
|
@ -148,7 +148,7 @@ define(["Tone/core/Tone"], function (Tone) {
|
|||
* @return {Tone.Analyser} this
|
||||
*/
|
||||
Tone.Analyser.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._analyser.disconnect();
|
||||
this._analyser = null;
|
||||
this._buffer = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/core/Param"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/core/Param", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -9,7 +9,7 @@ define(["Tone/core/Tone", "Tone/core/Param"], function(Tone){
|
|||
* by narrowing or "compressing" an audio signal's dynamic range.
|
||||
* Read more on [Wikipedia](https://en.wikipedia.org/wiki/Dynamic_range_compression).
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
* @param {Decibels|Object} [threshold] The value above which the compression starts to be applied.
|
||||
* @param {Positive} [ratio] The gain reduction ratio.
|
||||
|
@ -19,7 +19,7 @@ define(["Tone/core/Tone", "Tone/core/Param"], function(Tone){
|
|||
Tone.Compressor = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["threshold", "ratio"], Tone.Compressor);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* the compressor node
|
||||
|
@ -79,7 +79,7 @@ define(["Tone/core/Tone", "Tone/core/Param"], function(Tone){
|
|||
this.set(options);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Compressor);
|
||||
Tone.extend(Tone.Compressor, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @static
|
||||
|
@ -99,7 +99,7 @@ define(["Tone/core/Tone", "Tone/core/Param"], function(Tone){
|
|||
* @returns {Tone.Compressor} this
|
||||
*/
|
||||
Tone.Compressor.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable(["knee", "release", "attack", "ratio", "threshold"]);
|
||||
this._compressor.disconnect();
|
||||
this._compressor = null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr",
|
||||
"Tone/signal/EqualPowerGain", "Tone/core/Gain"], function(Tone){
|
||||
"Tone/signal/EqualPowerGain", "Tone/core/Gain", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -8,7 +8,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr",
|
|||
* More on crossfading technique [here](https://en.wikipedia.org/wiki/Fade_(audio_engineering)#Crossfading).
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {NormalRange} [initialFade=0.5]
|
||||
* @example
|
||||
* var crossFade = new Tone.CrossFade(0.5);
|
||||
|
@ -27,7 +27,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr",
|
|||
*/
|
||||
Tone.CrossFade = function(initialFade){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(2, 1);
|
||||
|
||||
/**
|
||||
|
@ -80,14 +80,14 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr",
|
|||
this._readOnly("fade");
|
||||
};
|
||||
|
||||
Tone.extend(Tone.CrossFade);
|
||||
Tone.extend(Tone.CrossFade, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* clean up
|
||||
* @returns {Tone.CrossFade} this
|
||||
*/
|
||||
Tone.CrossFade.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable("fade");
|
||||
this._equalPowerA.dispose();
|
||||
this._equalPowerA = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/core/Gain"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/core/Gain", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -7,7 +7,7 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/core/Gain"], fu
|
|||
* well as the low and high crossover frequencies.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
*
|
||||
* @param {Decibels|Object} [lowLevel] The gain applied to the lows.
|
||||
* @param {Decibels} [midLevel] The gain applied to the mid.
|
||||
|
@ -18,7 +18,7 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/core/Gain"], fu
|
|||
Tone.EQ3 = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["low", "mid", "high"], Tone.EQ3);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* the output node
|
||||
|
@ -107,7 +107,7 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/core/Gain"], fu
|
|||
this._readOnly(["low", "mid", "high", "lowFrequency", "highFrequency"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.EQ3);
|
||||
Tone.extend(Tone.EQ3, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* the default values
|
||||
|
@ -125,7 +125,7 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/core/Gain"], fu
|
|||
* @returns {Tone.EQ3} this
|
||||
*/
|
||||
Tone.EQ3.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable(["low", "mid", "high", "lowFrequency", "highFrequency"]);
|
||||
this._multibandSplit.dispose();
|
||||
this._multibandSplit = null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/TimelineSignal",
|
||||
"Tone/signal/Pow", "Tone/type/Type"], function(Tone){
|
||||
"Tone/signal/Pow", "Tone/type/Type", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -10,7 +10,7 @@ define(["Tone/core/Tone", "Tone/signal/TimelineSignal",
|
|||
* <img src="https://upload.wikimedia.org/wikipedia/commons/e/ea/ADSR_parameter.svg">
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Time} [attack] The amount of time it takes for the envelope to go from
|
||||
* 0 to it's maximum value.
|
||||
* @param {Time} [decay] The period of time after the attack that it takes for the envelope
|
||||
|
@ -33,7 +33,7 @@ define(["Tone/core/Tone", "Tone/signal/TimelineSignal",
|
|||
|
||||
//get all of the defaults
|
||||
var options = Tone.defaults(arguments, ["attack", "decay", "sustain", "release"], Tone.Envelope);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* When triggerAttack is called, the attack time is the amount of
|
||||
|
@ -92,7 +92,7 @@ define(["Tone/core/Tone", "Tone/signal/TimelineSignal",
|
|||
this.releaseCurve = options.releaseCurve;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Envelope);
|
||||
Tone.extend(Tone.Envelope, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* the default parameters
|
||||
|
@ -444,7 +444,7 @@ define(["Tone/core/Tone", "Tone/signal/TimelineSignal",
|
|||
* @returns {Tone.Envelope} this
|
||||
*/
|
||||
Tone.Envelope.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._sig.dispose();
|
||||
this._sig = null;
|
||||
this._attackCurve = null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/ScaleExp", "Tone/signal/Signal",
|
||||
"Tone/core/Param", "Tone/core/Delay", "Tone/core/Gain"], function(Tone){
|
||||
"Tone/core/Param", "Tone/core/Delay", "Tone/core/Gain", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -7,7 +7,7 @@ define(["Tone/core/Tone", "Tone/signal/ScaleExp", "Tone/signal/Signal",
|
|||
* @class Comb filters are basic building blocks for physical modeling. Read more
|
||||
* about comb filters on [CCRMA's website](https://ccrma.stanford.edu/~jos/pasp/Feedback_Comb_Filters.html).
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
* @param {Time|Object} [delayTime] The delay time of the filter.
|
||||
* @param {NormalRange=} resonance The amount of feedback the filter has.
|
||||
|
@ -15,7 +15,7 @@ define(["Tone/core/Tone", "Tone/signal/ScaleExp", "Tone/signal/Signal",
|
|||
Tone.FeedbackCombFilter = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["delayTime", "resonance"], Tone.FeedbackCombFilter);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* the delay node
|
||||
|
@ -49,7 +49,7 @@ define(["Tone/core/Tone", "Tone/signal/ScaleExp", "Tone/signal/Signal",
|
|||
this._readOnly(["resonance", "delayTime"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.FeedbackCombFilter);
|
||||
Tone.extend(Tone.FeedbackCombFilter, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* the default parameters
|
||||
|
@ -67,7 +67,7 @@ define(["Tone/core/Tone", "Tone/signal/ScaleExp", "Tone/signal/Signal",
|
|||
* @returns {Tone.FeedbackCombFilter} this
|
||||
*/
|
||||
Tone.FeedbackCombFilter.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable(["resonance", "delayTime"]);
|
||||
this._delay.dispose();
|
||||
this._delay = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/Signal"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -9,7 +9,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal"], function(Tone){
|
|||
* (default), -24 and -48.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Frequency|Object} [frequency] The cutoff frequency of the filter.
|
||||
* @param {string=} type The type of filter.
|
||||
* @param {number=} rolloff The drop in decibels per octave after the cutoff frequency.
|
||||
|
@ -20,7 +20,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal"], function(Tone){
|
|||
Tone.Filter = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["frequency", "type", "rolloff"], Tone.Filter);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(1, 1);
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal"], function(Tone){
|
|||
this._readOnly(["detune", "frequency", "gain", "Q"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Filter);
|
||||
Tone.extend(Tone.Filter, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* the default parameters
|
||||
|
@ -168,7 +168,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal"], function(Tone){
|
|||
* @return {Tone.Filter} this
|
||||
*/
|
||||
Tone.Filter.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
for (var i = 0; i < this._filters.length; i++) {
|
||||
this._filters[i].disconnect();
|
||||
this._filters[i] = null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/Abs", "Tone/signal/Subtract", "Tone/signal/Multiply",
|
||||
"Tone/signal/Signal", "Tone/signal/WaveShaper", "Tone/type/Type", "Tone/core/Delay"],
|
||||
"Tone/signal/Signal", "Tone/signal/WaveShaper", "Tone/type/Type", "Tone/core/Delay", "Tone/core/AudioNode"],
|
||||
function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
@ -13,7 +13,7 @@ function(Tone){
|
|||
* as envelope detectors) on [Wikipedia](https://en.wikipedia.org/wiki/Envelope_detector).
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Time|Object} [attack] The rate at which the follower rises.
|
||||
* @param {Time=} release The rate at which the folower falls.
|
||||
* @example
|
||||
|
@ -22,7 +22,7 @@ function(Tone){
|
|||
Tone.Follower = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["attack", "release"], Tone.Follower);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(1, 1);
|
||||
|
||||
/**
|
||||
|
@ -89,7 +89,7 @@ function(Tone){
|
|||
this._setAttackRelease(this._attack, this._release);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Follower);
|
||||
Tone.extend(Tone.Follower, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @static
|
||||
|
@ -165,7 +165,7 @@ function(Tone){
|
|||
* @returns {Tone.Follower} this
|
||||
*/
|
||||
Tone.Follower.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._filter.disconnect();
|
||||
this._filter = null;
|
||||
this._frequencyValues.disconnect();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/Follower", "Tone/signal/GreaterThan"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/Follower", "Tone/signal/GreaterThan", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -9,7 +9,7 @@ define(["Tone/core/Tone", "Tone/component/Follower", "Tone/signal/GreaterThan"],
|
|||
* A common implementation of this class is a [Noise Gate](https://en.wikipedia.org/wiki/Noise_gate).
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Decibels|Object} [threshold] The threshold above which the gate will open.
|
||||
* @param {Time=} attack The follower's attack time
|
||||
* @param {Time=} release The follower's release time
|
||||
|
@ -22,7 +22,7 @@ define(["Tone/core/Tone", "Tone/component/Follower", "Tone/signal/GreaterThan"],
|
|||
Tone.Gate = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["threshold", "attack", "release"], Tone.Gate);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(1, 1);
|
||||
|
||||
/**
|
||||
|
@ -43,7 +43,7 @@ define(["Tone/core/Tone", "Tone/component/Follower", "Tone/signal/GreaterThan"],
|
|||
this.input.chain(this._gt, this._follower, this.output.gain);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Gate);
|
||||
Tone.extend(Tone.Gate, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @const
|
||||
|
@ -106,7 +106,7 @@ define(["Tone/core/Tone", "Tone/component/Follower", "Tone/signal/GreaterThan"],
|
|||
* @returns {Tone.Gate} this
|
||||
*/
|
||||
Tone.Gate.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._follower.dispose();
|
||||
this._gt.dispose();
|
||||
this._follower = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/source/Oscillator", "Tone/signal/Scale",
|
||||
define(["Tone/core/Tone", "Tone/source/Oscillator", "Tone/signal/Scale", "Tone/core/AudioNode",
|
||||
"Tone/signal/Signal", "Tone/signal/AudioToGain", "Tone/type/Type", "Tone/signal/Zero"],
|
||||
function(Tone){
|
||||
|
||||
|
@ -11,7 +11,7 @@ function(Tone){
|
|||
* also be synced to the transport to start/stop and change when the tempo changes.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Frequency|Object} [frequency] The frequency of the oscillation. Typically, LFOs will be
|
||||
* in the frequency range of 0.1 to 10 hertz.
|
||||
* @param {number=} min The minimum output value of the LFO.
|
||||
|
@ -23,7 +23,7 @@ function(Tone){
|
|||
Tone.LFO = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["frequency", "min", "max"], Tone.LFO);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The oscillator.
|
||||
|
@ -103,7 +103,7 @@ function(Tone){
|
|||
this.phase = options.phase;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.LFO);
|
||||
Tone.extend(Tone.LFO, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* the default parameters
|
||||
|
@ -326,7 +326,7 @@ function(Tone){
|
|||
* @returns {Tone.LFO} this
|
||||
*/
|
||||
Tone.LFO.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable(["amplitude", "frequency"]);
|
||||
this._oscillator.dispose();
|
||||
this._oscillator = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/Compressor"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/Compressor", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -10,7 +10,7 @@ define(["Tone/core/Tone", "Tone/component/Compressor"], function(Tone){
|
|||
* smooth gain reduction and almost completely prevent
|
||||
* additional gain above the threshold.
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
* @param {number} threshold The theshold above which the limiting is applied.
|
||||
* @example
|
||||
|
@ -19,7 +19,7 @@ define(["Tone/core/Tone", "Tone/component/Compressor"], function(Tone){
|
|||
Tone.Limiter = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["threshold"], Tone.Limiter);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* the compressor
|
||||
|
@ -42,7 +42,7 @@ define(["Tone/core/Tone", "Tone/component/Compressor"], function(Tone){
|
|||
this._readOnly("threshold");
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Limiter);
|
||||
Tone.extend(Tone.Limiter, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The default value
|
||||
|
@ -59,7 +59,7 @@ define(["Tone/core/Tone", "Tone/component/Compressor"], function(Tone){
|
|||
* @returns {Tone.Limiter} this
|
||||
*/
|
||||
Tone.Limiter.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._compressor.dispose();
|
||||
this._compressor = null;
|
||||
this._writable("threshold");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/component/Filter",
|
||||
define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/component/Filter", "Tone/core/AudioNode",
|
||||
"Tone/core/Param", "Tone/core/Gain", "Tone/core/Delay"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
@ -7,7 +7,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/component/Filter",
|
|||
* @class Tone.Lowpass is a lowpass feedback comb filter. It is similar to
|
||||
* Tone.FeedbackCombFilter, but includes a lowpass filter.
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
* @param {Time|Object} [delayTime] The delay time of the comb filter
|
||||
* @param {NormalRange=} resonance The resonance (feedback) of the comb filter
|
||||
|
@ -17,7 +17,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/component/Filter",
|
|||
Tone.LowpassCombFilter = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["delayTime", "resonance", "dampening"], Tone.LowpassCombFilter);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(1, 1);
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/component/Filter",
|
|||
this._readOnly(["dampening", "resonance", "delayTime"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.LowpassCombFilter);
|
||||
Tone.extend(Tone.LowpassCombFilter, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* the default parameters
|
||||
|
@ -92,7 +92,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/component/Filter",
|
|||
* @returns {Tone.LowpassCombFilter} this
|
||||
*/
|
||||
Tone.LowpassCombFilter.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable(["dampening", "resonance", "delayTime"]);
|
||||
this.dampening.dispose();
|
||||
this.dampening = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -7,7 +7,7 @@ define(["Tone/core/Tone"], function(Tone){
|
|||
* channels of a single stereo channel.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @example
|
||||
* var merge = new Tone.Merge().toMaster();
|
||||
* //routing a sine tone in the left channel
|
||||
|
@ -20,7 +20,7 @@ define(["Tone/core/Tone"], function(Tone){
|
|||
*/
|
||||
Tone.Merge = function(){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(2, 0);
|
||||
|
||||
/**
|
||||
|
@ -54,14 +54,14 @@ define(["Tone/core/Tone"], function(Tone){
|
|||
this.right.channelCountMode = "explicit";
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Merge);
|
||||
Tone.extend(Tone.Merge, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* Clean up.
|
||||
* @returns {Tone.Merge} this
|
||||
*/
|
||||
Tone.Merge.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this.left.dispose();
|
||||
this.left = null;
|
||||
this.right.dispose();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/Analyser"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/Analyser", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -8,7 +8,7 @@ define(["Tone/core/Tone", "Tone/component/Analyser"], function(Tone){
|
|||
* value of the input signal.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {String} type Either "level" or "signal".
|
||||
* @param {Number} smoothing The amount of smoothing applied between frames.
|
||||
* @example
|
||||
|
@ -22,7 +22,7 @@ define(["Tone/core/Tone", "Tone/component/Analyser"], function(Tone){
|
|||
Tone.Meter = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["type", "smoothing"], Tone.Meter);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The type of the meter, either "level" or "signal".
|
||||
|
@ -55,7 +55,7 @@ define(["Tone/core/Tone", "Tone/component/Analyser"], function(Tone){
|
|||
this._lastValue = 0;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Meter);
|
||||
Tone.extend(Tone.Meter, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -114,7 +114,7 @@ define(["Tone/core/Tone", "Tone/component/Analyser"], function(Tone){
|
|||
* @returns {Tone.Meter} this
|
||||
*/
|
||||
Tone.Meter.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._analyser.dispose();
|
||||
this._analyser = null;
|
||||
return this;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/component/MidSideSplit", "Tone/component/MidSideMerge",
|
||||
"Tone/component/Compressor"], function(Tone){
|
||||
"Tone/component/Compressor", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -7,14 +7,14 @@ define(["Tone/core/Tone", "Tone/component/MidSideSplit", "Tone/component/MidSide
|
|||
* @class Tone.MidSideCompressor applies two different compressors to the mid
|
||||
* and side signal components. See Tone.MidSideSplit.
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Object} options The options that are passed to the mid and side
|
||||
* compressors.
|
||||
* @constructor
|
||||
*/
|
||||
Tone.MidSideCompressor = function(options){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
options = Tone.defaultArg(options, Tone.MidSideCompressor.defaults);
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ define(["Tone/core/Tone", "Tone/component/MidSideSplit", "Tone/component/MidSide
|
|||
this._readOnly(["mid", "side"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.MidSideCompressor);
|
||||
Tone.extend(Tone.MidSideCompressor, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @const
|
||||
|
@ -77,7 +77,7 @@ define(["Tone/core/Tone", "Tone/component/MidSideSplit", "Tone/component/MidSide
|
|||
* @returns {Tone.MidSideCompressor} this
|
||||
*/
|
||||
Tone.MidSideCompressor.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable(["mid", "side"]);
|
||||
this.mid.dispose();
|
||||
this.mid = null;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr", "Tone/component/Merge", "Tone/core/Gain"],
|
||||
define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr",
|
||||
"Tone/component/Merge", "Tone/core/Gain", "Tone/core/AudioNode"],
|
||||
function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
@ -14,12 +15,12 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr", "Tone/compon
|
|||
* Right = (Mid-Side)/sqrt(2); // obtain right signal from mid and side<br>
|
||||
* </code>
|
||||
*
|
||||
* @extends {Tone.StereoEffect}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
*/
|
||||
Tone.MidSideMerge = function(){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(2, 0);
|
||||
|
||||
/**
|
||||
|
@ -67,14 +68,14 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr", "Tone/compon
|
|||
this.context.getConstant(Math.SQRT1_2).connect(this._right, 0, 2);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.MidSideMerge);
|
||||
Tone.extend(Tone.MidSideMerge, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* clean up
|
||||
* @returns {Tone.MidSideMerge} this
|
||||
*/
|
||||
Tone.MidSideMerge.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this.mid.dispose();
|
||||
this.mid = null;
|
||||
this.side.dispose();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/Expr", "Tone/signal/Signal", "Tone/component/Split"],
|
||||
define(["Tone/core/Tone", "Tone/signal/Expr", "Tone/signal/Signal", "Tone/component/Split", "Tone/core/AudioNode"],
|
||||
function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
@ -12,12 +12,12 @@ define(["Tone/core/Tone", "Tone/signal/Expr", "Tone/signal/Signal", "Tone/compon
|
|||
* Side = (Left-Right)/sqrt(2); // obtain side-signal from left and righ<br>
|
||||
* </code>
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
*/
|
||||
Tone.MidSideSplit = function(){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(0, 2);
|
||||
|
||||
/**
|
||||
|
@ -49,14 +49,14 @@ define(["Tone/core/Tone", "Tone/signal/Expr", "Tone/signal/Signal", "Tone/compon
|
|||
this.context.getConstant(Math.SQRT1_2).connect(this.side, 0, 2);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.MidSideSplit);
|
||||
Tone.extend(Tone.MidSideSplit, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* clean up
|
||||
* @returns {Tone.MidSideSplit} this
|
||||
*/
|
||||
Tone.MidSideSplit.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this.mid.dispose();
|
||||
this.mid = null;
|
||||
this.side.dispose();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/Merge"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/Merge", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -7,12 +7,12 @@ define(["Tone/core/Tone", "Tone/component/Merge"], function(Tone){
|
|||
* where both left and right channels have the same value. This can be useful
|
||||
* for [stereo imaging](https://en.wikipedia.org/wiki/Stereo_imaging).
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
*/
|
||||
Tone.Mono = function(){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(1, 0);
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ define(["Tone/core/Tone", "Tone/component/Merge"], function(Tone){
|
|||
* @returns {Tone.Mono} this
|
||||
*/
|
||||
Tone.Mono.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._merge.dispose();
|
||||
this._merge = null;
|
||||
return this;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/component/Compressor"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/component/Compressor", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @class A compressor with seperate controls over low/mid/high dynamics
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
* @param {Object} options The low/mid/high compressor settings.
|
||||
* @example
|
||||
|
@ -19,7 +19,7 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/component/Compr
|
|||
*/
|
||||
Tone.MultibandCompressor = function(options){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
options = Tone.defaultArg(arguments, Tone.MultibandCompressor.defaults);
|
||||
|
||||
/**
|
||||
|
@ -79,7 +79,7 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/component/Compr
|
|||
this._readOnly(["high", "mid", "low", "highFrequency", "lowFrequency"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.MultibandCompressor);
|
||||
Tone.extend(Tone.MultibandCompressor, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @const
|
||||
|
@ -99,7 +99,7 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/component/Compr
|
|||
* @returns {Tone.MultibandCompressor} this
|
||||
*/
|
||||
Tone.MultibandCompressor.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._splitter.dispose();
|
||||
this._writable(["high", "mid", "low", "highFrequency", "lowFrequency"]);
|
||||
this.low.dispose();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/Filter", "Tone/signal/Signal", "Tone/core/Gain"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/Filter", "Tone/signal/Signal", "Tone/core/Gain", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -6,7 +6,7 @@ define(["Tone/core/Tone", "Tone/component/Filter", "Tone/signal/Signal", "Tone/c
|
|||
* @class Split the incoming signal into three bands (low, mid, high)
|
||||
* with two crossover frequency controls.
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
* @param {Frequency|Object} [lowFrequency] the low/mid crossover frequency
|
||||
* @param {Frequency} [highFrequency] the mid/high crossover frequency
|
||||
|
@ -14,7 +14,7 @@ define(["Tone/core/Tone", "Tone/component/Filter", "Tone/signal/Signal", "Tone/c
|
|||
Tone.MultibandSplit = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["lowFrequency", "highFrequency"], Tone.MultibandSplit);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* the input
|
||||
|
@ -92,7 +92,7 @@ define(["Tone/core/Tone", "Tone/component/Filter", "Tone/signal/Signal", "Tone/c
|
|||
this._readOnly(["high", "mid", "low", "highFrequency", "lowFrequency"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.MultibandSplit);
|
||||
Tone.extend(Tone.MultibandSplit, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
@ -110,7 +110,7 @@ define(["Tone/core/Tone", "Tone/component/Filter", "Tone/signal/Signal", "Tone/c
|
|||
* @returns {Tone.MultibandSplit} this
|
||||
*/
|
||||
Tone.MultibandSplit.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable(["high", "mid", "low", "highFrequency", "lowFrequency"]);
|
||||
this.low.dispose();
|
||||
this.low = null;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
define(["Tone/core/Tone", "Tone/component/Panner", "Tone/component/Volume"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/Panner", "Tone/component/Volume", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @class Tone.PanVol is a Tone.Panner and Tone.Volume in one.
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
* @param {AudioRange} pan the initial pan
|
||||
* @param {number} volume The output volume.
|
||||
|
@ -16,7 +16,7 @@ define(["Tone/core/Tone", "Tone/component/Panner", "Tone/component/Volume"], fun
|
|||
Tone.PanVol = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["pan", "volume"], Tone.PanVol);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The panning node
|
||||
|
@ -53,7 +53,7 @@ define(["Tone/core/Tone", "Tone/component/Panner", "Tone/component/Volume"], fun
|
|||
this._readOnly(["pan", "volume"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.PanVol);
|
||||
Tone.extend(Tone.PanVol, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The defaults
|
||||
|
@ -87,7 +87,7 @@ define(["Tone/core/Tone", "Tone/component/Panner", "Tone/component/Volume"], fun
|
|||
* @returns {Tone.PanVol} this
|
||||
*/
|
||||
Tone.PanVol.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable(["pan", "volume"]);
|
||||
this._panner.dispose();
|
||||
this._panner = null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/component/CrossFade", "Tone/component/Merge", "Tone/component/Split",
|
||||
"Tone/signal/Signal", "Tone/signal/AudioToGain", "Tone/signal/Zero"],
|
||||
"Tone/signal/Signal", "Tone/signal/AudioToGain", "Tone/signal/Zero", "Tone/core/AudioNode"],
|
||||
function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
@ -9,7 +9,7 @@ function(Tone){
|
|||
* support 3D. Panner uses the StereoPannerNode when available.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {NormalRange} [initialPan=0] The initail panner value (center).
|
||||
* @example
|
||||
* //pan the input signal hard right.
|
||||
|
@ -17,7 +17,7 @@ function(Tone){
|
|||
*/
|
||||
Tone.Panner = function(initialPan){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
if (Tone.Panner.hasStereoPanner){
|
||||
|
||||
/**
|
||||
|
@ -91,7 +91,7 @@ function(Tone){
|
|||
this._readOnly("pan");
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Panner);
|
||||
Tone.extend(Tone.Panner, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* Indicates if the panner is using the new StereoPannerNode internally
|
||||
|
@ -107,7 +107,7 @@ function(Tone){
|
|||
* @returns {Tone.Panner} this
|
||||
*/
|
||||
Tone.Panner.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable("pan");
|
||||
if (Tone.Panner.hasStereoPanner){
|
||||
this._panner.disconnect();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/component/CrossFade", "Tone/component/Merge", "Tone/component/Split",
|
||||
"Tone/signal/Signal", "Tone/signal/AudioToGain", "Tone/signal/Zero"],
|
||||
"Tone/signal/Signal", "Tone/signal/AudioToGain", "Tone/signal/Zero", "Tone/core/AudioNode"],
|
||||
function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
@ -9,7 +9,7 @@ function(Tone){
|
|||
* Tries to normalize the API across various browsers. See Tone.Listener
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Number} positionX The initial x position.
|
||||
* @param {Number} positionY The initial y position.
|
||||
* @param {Number} positionZ The initial z position.
|
||||
|
@ -17,7 +17,7 @@ function(Tone){
|
|||
Tone.Panner3D = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["positionX", "positionY", "positionZ"], Tone.Panner3D);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The panner node
|
||||
|
@ -58,7 +58,7 @@ function(Tone){
|
|||
this.positionZ = options.positionZ;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Panner3D);
|
||||
Tone.extend(Tone.Panner3D, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* Defaults according to the specification
|
||||
|
@ -313,6 +313,7 @@ function(Tone){
|
|||
* @returns {Tone.Panner3D} this
|
||||
*/
|
||||
Tone.Panner3D.prototype.dispose = function(){
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._panner.disconnect();
|
||||
this._panner = null;
|
||||
this._orientation = null;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
define(["Tone/core/Tone", "Tone/core/Gain"], function (Tone) {
|
||||
define(["Tone/core/Tone", "Tone/core/Gain", "Tone/core/AudioNode"], function (Tone) {
|
||||
|
||||
/**
|
||||
* @class Tone.Solo lets you isolate a specific audio stream. When
|
||||
* an instance is set to `solo=true`, it will mute all other instances.
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @example
|
||||
* var soloA = new Tone.Solo()
|
||||
* var soloB = new Tone.Solo()
|
||||
|
@ -13,7 +13,7 @@ define(["Tone/core/Tone", "Tone/core/Gain"], function (Tone) {
|
|||
Tone.Solo = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["solo"], Tone.Solo);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The input and output node
|
||||
|
@ -34,7 +34,7 @@ define(["Tone/core/Tone", "Tone/core/Gain"], function (Tone) {
|
|||
this.solo = options.solo;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Solo);
|
||||
Tone.extend(Tone.Solo, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The defaults
|
||||
|
@ -144,10 +144,10 @@ define(["Tone/core/Tone", "Tone/core/Gain"], function (Tone) {
|
|||
* @return {Tone.Solo} this
|
||||
*/
|
||||
Tone.Solo.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
this.context.off("solo", this._soloBind);
|
||||
this._removeSolo();
|
||||
this._soloBind = null;
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
return this;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/core/Gain"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/core/Gain", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -6,14 +6,14 @@ define(["Tone/core/Tone", "Tone/core/Gain"], function(Tone){
|
|||
* @class Tone.Split splits an incoming signal into left and right channels.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @example
|
||||
* var split = new Tone.Split();
|
||||
* stereoSignal.connect(split);
|
||||
*/
|
||||
Tone.Split = function(){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(0, 2);
|
||||
|
||||
/**
|
||||
|
@ -43,14 +43,14 @@ define(["Tone/core/Tone", "Tone/core/Gain"], function(Tone){
|
|||
this._splitter.connect(this.right, 1, 0);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Split);
|
||||
Tone.extend(Tone.Split, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* Clean up.
|
||||
* @returns {Tone.Split} this
|
||||
*/
|
||||
Tone.Split.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._splitter.disconnect();
|
||||
this.left.dispose();
|
||||
this.left = null;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/core/Gain"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/core/Gain", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @class Tone.Volume is a simple volume node, useful for creating a volume fader.
|
||||
*
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @constructor
|
||||
* @param {Decibels} [volume=0] the initial volume
|
||||
* @example
|
||||
|
@ -15,7 +15,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/core/Gain"], function(Tone
|
|||
Tone.Volume = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["volume"], Tone.Volume);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* the output node
|
||||
|
@ -44,7 +44,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/core/Gain"], function(Tone
|
|||
this.mute = options.mute;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Volume);
|
||||
Tone.extend(Tone.Volume, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* Defaults
|
||||
|
@ -87,7 +87,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/core/Gain"], function(Tone
|
|||
*/
|
||||
Tone.Volume.prototype.dispose = function(){
|
||||
this.input.dispose();
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable("volume");
|
||||
this.volume.dispose();
|
||||
this.volume = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/core/Param"], function (Tone) {
|
||||
define(["Tone/core/Tone", "Tone/core/Param", "Tone/core/AudioNode"], function (Tone) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -19,7 +19,7 @@ define(["Tone/core/Tone", "Tone/core/Param"], function (Tone) {
|
|||
Tone.Delay = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["delayTime", "maxDelay"], Tone.Delay);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The native delay node
|
||||
|
@ -43,7 +43,7 @@ define(["Tone/core/Tone", "Tone/core/Param"], function (Tone) {
|
|||
this._readOnly("delayTime");
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Delay);
|
||||
Tone.extend(Tone.Delay, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The defaults
|
||||
|
@ -60,7 +60,7 @@ define(["Tone/core/Tone", "Tone/core/Param"], function (Tone) {
|
|||
* @return {Tone.Delay} this
|
||||
*/
|
||||
Tone.Delay.prototype.dispose = function(){
|
||||
Tone.Param.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._delayNode.disconnect();
|
||||
this._delayNode = null;
|
||||
this._writable("delayTime");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/core/Param", "Tone/type/Type"], function (Tone) {
|
||||
define(["Tone/core/Tone", "Tone/core/Param", "Tone/type/Type", "Tone/core/AudioNode"], function (Tone) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -21,7 +21,7 @@ define(["Tone/core/Tone", "Tone/core/Param", "Tone/type/Type"], function (Tone)
|
|||
Tone.Gain = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["gain", "units"], Tone.Gain);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The GainNode
|
||||
|
@ -44,7 +44,7 @@ define(["Tone/core/Tone", "Tone/core/Param", "Tone/type/Type"], function (Tone)
|
|||
this._readOnly("gain");
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Gain);
|
||||
Tone.extend(Tone.Gain, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The defaults
|
||||
|
@ -61,7 +61,7 @@ define(["Tone/core/Tone", "Tone/core/Param", "Tone/type/Type"], function (Tone)
|
|||
* @return {Tone.Gain} this
|
||||
*/
|
||||
Tone.Gain.prototype.dispose = function(){
|
||||
Tone.Param.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._gainNode.disconnect();
|
||||
this._gainNode = null;
|
||||
this._writable("gain");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/Volume", "Tone/core/Context"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/Volume", "Tone/core/Context", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -24,7 +24,7 @@ define(["Tone/core/Tone", "Tone/component/Volume", "Tone/core/Context"], functio
|
|||
*/
|
||||
Tone.Master = function(){
|
||||
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
Tone.getContext(function(){
|
||||
this.createInsOuts(1, 0);
|
||||
|
||||
|
@ -48,7 +48,7 @@ define(["Tone/core/Tone", "Tone/component/Volume", "Tone/core/Context"], functio
|
|||
}.bind(this));
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Master);
|
||||
Tone.extend(Tone.Master, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
|
@ -108,7 +108,7 @@ define(["Tone/core/Tone", "Tone/component/Volume", "Tone/core/Context"], functio
|
|||
* @return {Tone.Master} this
|
||||
*/
|
||||
Tone.Master.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._writable("volume");
|
||||
this._volume.dispose();
|
||||
this._volume = null;
|
||||
|
@ -121,12 +121,12 @@ define(["Tone/core/Tone", "Tone/component/Volume", "Tone/core/Context"], functio
|
|||
|
||||
/**
|
||||
* Connect 'this' to the master output. Shorthand for this.connect(Tone.Master)
|
||||
* @returns {Tone} this
|
||||
* @returns {Tone.AudioNode} this
|
||||
* @example
|
||||
* //connect an oscillator to the master output
|
||||
* var osc = new Tone.Oscillator().toMaster();
|
||||
*/
|
||||
Tone.prototype.toMaster = function(){
|
||||
Tone.AudioNode.prototype.toMaster = function(){
|
||||
this.connect(Tone.Master);
|
||||
return this;
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@ define(["Tone/core/Tone", "Tone/type/Type"], function(Tone){
|
|||
Tone.Param = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["param", "units", "convert"], Tone.Param);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The native parameter to control
|
||||
|
@ -59,7 +59,7 @@ define(["Tone/core/Tone", "Tone/type/Type"], function(Tone){
|
|||
}
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Param);
|
||||
Tone.extend(Tone.Param, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* Defaults
|
||||
|
@ -361,7 +361,7 @@ define(["Tone/core/Tone", "Tone/type/Type"], function(Tone){
|
|||
* @returns {Tone.Param} this
|
||||
*/
|
||||
Tone.Param.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._param = null;
|
||||
if (this._lfo){
|
||||
this._lfo.dispose();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/CrossFade"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/CrossFade", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -8,13 +8,13 @@ define(["Tone/core/Tone", "Tone/component/CrossFade"], function(Tone){
|
|||
* effect which goes to the output using the wet control.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {NormalRange|Object} [wet] The starting wet value.
|
||||
*/
|
||||
Tone.Effect = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["wet"], Tone.Effect);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
this.createInsOuts(1, 1);
|
||||
|
||||
/**
|
||||
|
@ -55,7 +55,7 @@ define(["Tone/core/Tone", "Tone/component/CrossFade"], function(Tone){
|
|||
this._readOnly(["wet"]);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Effect);
|
||||
Tone.extend(Tone.Effect, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* @static
|
||||
|
@ -81,7 +81,7 @@ define(["Tone/core/Tone", "Tone/component/CrossFade"], function(Tone){
|
|||
* @returns {Tone.Effect} this
|
||||
*/
|
||||
Tone.Effect.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._dryWet.dispose();
|
||||
this._dryWet = null;
|
||||
this.effectSend.dispose();
|
||||
|
|
|
@ -13,6 +13,7 @@ function(Tone){
|
|||
Tone.StereoEffect = function(){
|
||||
|
||||
//get the defaults
|
||||
Tone.AudioNode.call(this);
|
||||
var options = Tone.defaults(arguments, ["wet"], Tone.Effect);
|
||||
this.createInsOuts(1, 1);
|
||||
|
||||
|
@ -89,7 +90,7 @@ function(Tone){
|
|||
* @returns {Tone.StereoEffect} this
|
||||
*/
|
||||
Tone.StereoEffect.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._dryWet.dispose();
|
||||
this._dryWet = null;
|
||||
this._split.dispose();
|
||||
|
|
|
@ -6,13 +6,13 @@ define(["Tone/core/Tone", "Tone/type/Type", "Tone/core/Master"], function(Tone){
|
|||
* @class Base-class for all instruments
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
*/
|
||||
Tone.Instrument = function(options){
|
||||
|
||||
//get the defaults
|
||||
options = Tone.defaultArg(options, Tone.Instrument.defaults);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The output and volume triming node
|
||||
|
@ -32,7 +32,7 @@ define(["Tone/core/Tone", "Tone/type/Type", "Tone/core/Master"], function(Tone){
|
|||
this._readOnly("volume");
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Instrument);
|
||||
Tone.extend(Tone.Instrument, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* the default attributes
|
||||
|
@ -82,7 +82,7 @@ define(["Tone/core/Tone", "Tone/type/Type", "Tone/core/Master"], function(Tone){
|
|||
* @returns {Tone.Instrument} this
|
||||
*/
|
||||
Tone.Instrument.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._volume.dispose();
|
||||
this._volume = null;
|
||||
this._writable(["volume"]);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -9,10 +9,10 @@ define(["Tone/core/Tone"], function(Tone){
|
|||
* @extends {Tone}
|
||||
*/
|
||||
Tone.SignalBase = function(){
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
};
|
||||
|
||||
Tone.extend(Tone.SignalBase);
|
||||
Tone.extend(Tone.SignalBase, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* When signals connect to other signals or AudioParams,
|
||||
|
@ -40,7 +40,7 @@ define(["Tone/core/Tone"], function(Tone){
|
|||
node.cancelScheduledValues(0);
|
||||
node.value = 0;
|
||||
}
|
||||
Tone.prototype.connect.call(this, node, outputNumber, inputNumber);
|
||||
Tone.AudioNode.prototype.connect.call(this, node, outputNumber, inputNumber);
|
||||
return this;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/core/Gain"], function (Tone) {
|
||||
define(["Tone/core/Tone", "Tone/core/Gain", "Tone/signal/SignalBase"], function (Tone) {
|
||||
|
||||
/**
|
||||
* @class Tone.Zero outputs 0's at audio-rate. The reason this has to be
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/Gain"], function (Tone) {
|
||||
define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/Gain", "Tone/core/AudioNode"], function (Tone) {
|
||||
|
||||
/**
|
||||
* BufferSource polyfill
|
||||
|
@ -10,7 +10,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G
|
|||
|
||||
/**
|
||||
* @class Wrapper around the native BufferSourceNode.
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {AudioBuffer|Tone.Buffer} buffer The buffer to play
|
||||
* @param {Function} onload The callback to invoke when the
|
||||
* buffer is done playing.
|
||||
|
@ -18,7 +18,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G
|
|||
Tone.BufferSource = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["buffer", "onload"], Tone.BufferSource);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The callback to invoke after the
|
||||
|
@ -102,7 +102,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G
|
|||
this.playbackRate.value = options.playbackRate;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.BufferSource);
|
||||
Tone.extend(Tone.BufferSource, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The defaults
|
||||
|
@ -340,7 +340,7 @@ define(["Tone/core/Tone", "Tone/core/Buffer", "Tone/source/Source", "Tone/core/G
|
|||
* @return {Tone.BufferSource} this
|
||||
*/
|
||||
Tone.BufferSource.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this.onended = null;
|
||||
this._source.disconnect();
|
||||
this._source = null;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/source/Player", "Tone/component/Volume"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/source/Player", "Tone/component/Volume", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -6,7 +6,7 @@ define(["Tone/core/Tone", "Tone/source/Player", "Tone/component/Volume"], functi
|
|||
* @class Tone.Players combines multiple [Tone.Player](Player) objects.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Object} urls An object mapping a name to a url.
|
||||
* @param {function=} onload The function to invoke when the buffer is loaded.
|
||||
*/
|
||||
|
@ -75,7 +75,7 @@ define(["Tone/core/Tone", "Tone/source/Player", "Tone/component/Volume"], functi
|
|||
}
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Players);
|
||||
Tone.extend(Tone.Players, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The default values
|
||||
|
@ -258,7 +258,7 @@ define(["Tone/core/Tone", "Tone/source/Player", "Tone/component/Volume"], functi
|
|||
* @return {Tone.Players} this
|
||||
*/
|
||||
Tone.Players.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this._volume.dispose();
|
||||
this._volume = null;
|
||||
this._writable("volume");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Tone/core/Tone", "Tone/core/Transport", "Tone/component/Volume", "Tone/core/Master",
|
||||
"Tone/type/Type", "Tone/core/TimelineState", "Tone/signal/Signal"],
|
||||
"Tone/type/Type", "Tone/core/TimelineState", "Tone/signal/Signal", "Tone/core/AudioNode"],
|
||||
function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
@ -10,7 +10,7 @@ function(Tone){
|
|||
* start/stop of Tone.Transport.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @example
|
||||
* //Multiple state change events can be chained together,
|
||||
* //but must be set in the correct order and with ascending times
|
||||
|
@ -28,8 +28,8 @@ function(Tone){
|
|||
*/
|
||||
Tone.Source = function(options){
|
||||
|
||||
Tone.call(this);
|
||||
options = Tone.defaultArg(options, Tone.Source.defaults);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The output volume node
|
||||
|
@ -77,7 +77,7 @@ function(Tone){
|
|||
this.mute = options.mute;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.Source);
|
||||
Tone.extend(Tone.Source, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* The default parameters
|
||||
|
@ -264,7 +264,7 @@ function(Tone){
|
|||
* @return {Tone.Source} this
|
||||
*/
|
||||
Tone.Source.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this.unsync();
|
||||
this._scheduled = null;
|
||||
this._writable("volume");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(["Tone/core/Tone", "Tone/component/Volume"], function(Tone){
|
||||
define(["Tone/core/Tone", "Tone/component/Volume", "Tone/core/AudioNode"], function(Tone){
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -10,7 +10,7 @@ define(["Tone/core/Tone", "Tone/component/Volume"], function(Tone){
|
|||
* is limited to secure (HTTPS) connections.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {Tone}
|
||||
* @extends {Tone.AudioNode}
|
||||
* @param {Decibels=} volume The level of the input
|
||||
* @example
|
||||
* //list the inputs and open the third one
|
||||
|
@ -27,7 +27,7 @@ define(["Tone/core/Tone", "Tone/component/Volume"], function(Tone){
|
|||
Tone.UserMedia = function(){
|
||||
|
||||
var options = Tone.defaults(arguments, ["volume"], Tone.UserMedia);
|
||||
Tone.call(this);
|
||||
Tone.AudioNode.call(this);
|
||||
|
||||
/**
|
||||
* The MediaStreamNode
|
||||
|
@ -70,7 +70,7 @@ define(["Tone/core/Tone", "Tone/component/Volume"], function(Tone){
|
|||
this.mute = options.mute;
|
||||
};
|
||||
|
||||
Tone.extend(Tone.UserMedia);
|
||||
Tone.extend(Tone.UserMedia, Tone.AudioNode);
|
||||
|
||||
/**
|
||||
* the default parameters
|
||||
|
@ -253,7 +253,7 @@ define(["Tone/core/Tone", "Tone/component/Volume"], function(Tone){
|
|||
* @return {Tone.UserMedia} this
|
||||
*/
|
||||
Tone.UserMedia.prototype.dispose = function(){
|
||||
Tone.prototype.dispose.call(this);
|
||||
Tone.AudioNode.prototype.dispose.call(this);
|
||||
this.close();
|
||||
this._writable("volume");
|
||||
this._volume.dispose();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(["Tone/component/Panner", "helper/Basic", "helper/Offline", "Test", "Tone/signal/Signal",
|
||||
"helper/PassAudio", "helper/PassAudioStereo", "Tone/component/Merge", "Tone/core/Tone", "helper/Supports"],
|
||||
function (Panner, Basic, Offline, Test, Signal, PassAudio, PassAudioStereo, Merge, Tone, Supports) {
|
||||
"helper/PassAudio", "helper/PassAudioStereo", "Tone/component/Merge", "Tone/core/Tone", "helper/Supports", "Tone/core/AudioNode"],
|
||||
function (Panner, Basic, Offline, Test, Signal, PassAudio, PassAudioStereo, Merge, Tone, Supports, AudioNode) {
|
||||
|
||||
//a stereo signal for testing
|
||||
var StereoSignal = function(val){
|
||||
|
@ -15,7 +15,7 @@ function (Panner, Basic, Offline, Test, Signal, PassAudio, PassAudioStereo, Merg
|
|||
}
|
||||
};
|
||||
|
||||
Tone.extend(StereoSignal);
|
||||
Tone.extend(StereoSignal, AudioNode);
|
||||
|
||||
StereoSignal.prototype.dispose = function(){
|
||||
if (Panner.hasStereoPanner){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["Test", "Tone/core/Master", "Tone/core/Tone", "helper/Offline", "helper/PassAudio", "Tone/source/Oscillator"],
|
||||
function (Test, Master, Tone, Offline, PassAudio, Oscillator) {
|
||||
define(["Test", "Tone/core/Master", "Tone/core/Tone", "helper/Offline", "helper/PassAudio", "Tone/source/Oscillator", "Tone/core/AudioNode"],
|
||||
function (Test, Master, Tone, Offline, PassAudio, Oscillator, AudioNode) {
|
||||
|
||||
describe("Master", function(){
|
||||
it ("exists", function(){
|
||||
|
@ -7,7 +7,7 @@ define(["Test", "Tone/core/Master", "Tone/core/Tone", "helper/Offline", "helper/
|
|||
});
|
||||
|
||||
it ("provides a toMaster method", function(){
|
||||
expect(Tone.prototype.toMaster).is.a("function");
|
||||
expect(AudioNode.prototype.toMaster).is.a("function");
|
||||
var gain = Tone.context.createGain();
|
||||
expect(gain.toMaster).is.a("function");
|
||||
gain.toMaster();
|
||||
|
|
Loading…
Reference in a new issue