doc updates

This commit is contained in:
Yotam Mann 2014-07-20 18:17:24 -04:00
parent 2ee294b278
commit e6bcb3b10c
5 changed files with 20 additions and 28 deletions

View file

@ -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}

View file

@ -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}

View file

@ -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);

View file

@ -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}

View file

@ -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}