From e6bcb3b10c2c1cf591015f26840f4ec8a389d173 Mon Sep 17 00:00:00 2001 From: Yotam Mann Date: Sun, 20 Jul 2014 18:17:24 -0400 Subject: [PATCH] doc updates --- Tone/source/Microphone.js | 13 +++---------- Tone/source/Noise.js | 5 ++--- Tone/source/Oscillator.js | 16 ++++++++++------ Tone/source/Player.js | 4 +--- Tone/source/Source.js | 10 ++++------ 5 files changed, 20 insertions(+), 28 deletions(-) diff --git a/Tone/source/Microphone.js b/Tone/source/Microphone.js index 7fb22e87..449ce7f8 100644 --- a/Tone/source/Microphone.js +++ b/Tone/source/Microphone.js @@ -1,16 +1,9 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// WEB RTC MICROPHONE -// -/////////////////////////////////////////////////////////////////////////////// - define(["Tone/core/Tone", "Tone/source/Source"], function(Tone){ /** - * WebRTC Microphone - * - * CHROME ONLY (for now) because of the - * use of the MediaStreamAudioSourceNode + * @class WebRTC Microphone. + * CHROME ONLY (for now) because of the + * use of the MediaStreamAudioSourceNode * * @constructor * @extends {Tone.Source} diff --git a/Tone/source/Noise.js b/Tone/source/Noise.js index 03d02316..1a10fec1 100644 --- a/Tone/source/Noise.js +++ b/Tone/source/Noise.js @@ -5,9 +5,8 @@ define(["Tone/core/Tone", "Tone/source/Source"], function(Tone){ var bufferLength = sampleRate * 4; /** - * Noise generator. - * - * uses looped noise buffers to save on performance. + * @class Noise generator. + * Uses looped noise buffers to save on performance. * * @constructor * @extends {Tone.Source} diff --git a/Tone/source/Oscillator.js b/Tone/source/Oscillator.js index db5c575e..51b8c3a5 100644 --- a/Tone/source/Oscillator.js +++ b/Tone/source/Oscillator.js @@ -2,9 +2,7 @@ define(["Tone/core/Tone", "Tone/core/Transport", "Tone/signal/Signal", "Tone/sou function(Tone){ /** - * Oscillator - * - * Oscilator with start, pause, stop and sync to Transport + * @class Oscilator with start, pause, stop and sync to Transport methods * * @constructor * @extends {Tone.Source} @@ -25,6 +23,12 @@ function(Tone){ */ this.frequency = new Tone.Signal(this.defaultArg(this.toFrequency(freq), 440)); + /** + * the detune control signal + * @type {Tone.Signal} + */ + this.detune = new Tone.Signal(0); + /** * @type {function()} */ @@ -48,15 +52,15 @@ function(Tone){ this.state = Tone.Source.State.STARTED; //get previous values var type = this.oscillator.type; - var detune = this.oscillator.detune.value; //new oscillator with previous values this.oscillator = this.context.createOscillator(); this.oscillator.type = type; - this.oscillator.detune.value = detune; - //connect the control signal to the oscillator frequency + //connect the control signal to the oscillator frequency & detune this.oscillator.connect(this.output); this.frequency.connect(this.oscillator.frequency); this.oscillator.frequency.value = 0; + this.detune.connect(this.oscillator.detune); + this.oscillator.detune.value = 0; //start the oscillator this.oscillator.start(this.toSeconds(time)); this.oscillator.onended = this._onended.bind(this); diff --git a/Tone/source/Player.js b/Tone/source/Player.js index a7480152..676c6ad0 100644 --- a/Tone/source/Player.js +++ b/Tone/source/Player.js @@ -1,9 +1,7 @@ define(["Tone/core/Tone", "Tone/source/Source"], function(Tone){ /** - * Audio Player - * - * Audio file player with start, loop, stop. + * @class Audio file player with start, loop, stop. * * @constructor * @extends {Tone.Source} diff --git a/Tone/source/Source.js b/Tone/source/Source.js index 55a7316b..033f2bfb 100644 --- a/Tone/source/Source.js +++ b/Tone/source/Source.js @@ -1,11 +1,9 @@ define(["Tone/core/Tone", "Tone/core/Transport"], function(Tone){ /** - * base class for sources - * - * sources have start/stop/pause - * - * they also have the ability to be synced to the - * start/stop/pause of Tone.Transport + * @class Base class for sources. + * Sources have start/stop/pause and + * the ability to be synced to the + * start/stop/pause of Tone.Transport. * * @constructor * @extends {Tone}