Skip to content

Commit

Permalink
merged BlokdustTone with ToneMaster-r4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lukephills committed May 20, 2015
2 parents cf18449 + c94861c commit 406fda6
Show file tree
Hide file tree
Showing 98 changed files with 8,188 additions and 6,166 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
### r5-dev

* reverse buffer for Player and Sampler.
* Tone.Volume for simple volume control in Decibels.
* Panner uses StereoPannerNode when available.
* AutoFilter effect
* Made many attributes read-only. preventing this common type of error: `oscillator.frequency = 200` when it should be `oscillator.frequency.value = 200`.
* Envelope supports "linear" and "exponential" attack curves.
* Renamed Tone.EQ -> Tone.EQ3.
* Tone.DrumSynth makes kick and tom sounds.
* Tone.MidSideCompressor and Tone.MidSideSplit/Tone.MidSideMerge
* Tone.Oscillator - can specify the number of partials in the type: i.e. "sine10", "triangle3", "square4", etc.

### r4 - Cool is cool

* `toFrequency` accepts notes by name (i.e. `"C4"`)
Expand All @@ -7,7 +20,7 @@
* Sampler accepts multiple samples as an object.
* `setPitch` in sampler -> `setNote`
* Deprecated MultiSampler - use Sampler with PolySynth instead
* Added [cdn](cdn.tonejs.org/latest/Tone.min.js) - please don't use for production code
* Added [cdn](http://cdn.tonejs.org/latest/Tone.min.js) - please don't use for production code
* Renamed DryWet to CrossFade
* Functions return `this` to allow for chaining. i.e. `player.toMaster().start(2)`.
* Added `units` to Signal class which allows signals to be set in terms of Tone.Time, Tone.Frequency, Numbers, or Decibels.
Expand Down
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[The MIT License](http://opensource.org/licenses/MIT)

Copyright © 2014-2015 Yotam Mann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Tone.js

Tone.js is a Web Audio framework for creating interactive music in the browser. The architecture of Tone.js aims to be familiar to both musicians and audio programmers looking to create web-based audio applications. On the high-level, Tone offers common DAW (digital audio workstation) features like a global transport, prebuilt synths and effects, as well as presets for those synths and effects. For signal-processing programmers (coming from languages like Max/MSP), Tone provides a wealth of high performance, low latency building blocks and DSP modules to build your own synthesizers, effects, and complex control signals.

[Examples](http://tonenotone.github.io/Tone.js/examples/)
[Examples](http://tonejs.org/examples/)

[API](http://tonejs.org/docs/Tone.html)

Expand All @@ -14,6 +14,7 @@ Tone.js is a Web Audio framework for creating interactive music in the browser.
* [Hypercube by @eddietree](http://eddietree.github.io/hypercube/)
* [randomcommander.io by Jake Albaugh](http://randomcommander.io/)
* [Tone.js + NexusUI by taylorbf](http://taylorbf.github.io/Tone-Rack/)
* [Solarbeat - Luke Twyman](http://www.whitevinyldesign.com/solarbeat/)

Using Tone.js? I'd love to hear it: [email protected]

Expand Down Expand Up @@ -104,7 +105,7 @@ Tone also let's you set your own AudioContext using `Tone.setContext`.

# Performance

Tone.js uses very few ScriptProcessorNodes. Nearly all of the Tone Modules find a native Web Audio component workaround, making extensive use of the GainNode and WaveShaperNode especially, which enables Tone.js to work well on both desktop and mobile browsers. While the ScripProcessorNode is extremely powerful, it introduces a lot of latency and the potential for glitches more than any other node.
Tone.js uses very few ScriptProcessorNodes. Nearly all of the Tone Modules find a native Web Audio component workaround, making extensive use of the GainNode and WaveShaperNode especially, which enables Tone.js to work well on both desktop and mobile browsers. While the ScriptProcessorNode is extremely powerful, it introduces a lot of latency and the potential for glitches more than any other node.

# References and Inspiration

Expand Down
13 changes: 6 additions & 7 deletions Tone/component/Compressor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(["Tone/core/Tone"], function(Tone){
define(["Tone/core/Tone", "Tone/signal/Signal"], function(Tone){

"use strict";

Expand All @@ -21,12 +21,7 @@ define(["Tone/core/Tone"], function(Tone){
* @type {DynamicsCompressorNode}
* @private
*/
this._compressor = this.context.createDynamicsCompressor();

/**
* the input and output
*/
this.input = this.output = this._compressor;
this._compressor = this.input = this.output = this.context.createDynamicsCompressor();

/**
* the threshold vaue
Expand Down Expand Up @@ -59,6 +54,9 @@ define(["Tone/core/Tone"], function(Tone){
this.ratio = this._compressor.ratio;

//set the defaults
this.attack.connect(this._compressor.attack);
this.release.connect(this._compressor.release);
this._readOnly(["knee", "release", "attack", "ratio", "threshold"]);
this.set(options);
};

Expand All @@ -83,6 +81,7 @@ define(["Tone/core/Tone"], function(Tone){
*/
Tone.Compressor.prototype.dispose = function(){
Tone.prototype.dispose.call(this);
this._writable(["knee", "release", "attack", "ratio", "threshold"]);
this._compressor.disconnect();
this._compressor = null;
this.attack.dispose();
Expand Down
2 changes: 2 additions & 0 deletions Tone/component/CrossFade.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr", "Tone/signal
this.b.connect(this.output);
this.fade.chain(this._equalPowerB, this.b.gain);
this.fade.chain(this._invert, this._equalPowerA, this.a.gain);
this._readOnly("fade");
};

Tone.extend(Tone.CrossFade);
Expand All @@ -81,6 +82,7 @@ define(["Tone/core/Tone", "Tone/signal/Signal", "Tone/signal/Expr", "Tone/signal
*/
Tone.CrossFade.prototype.dispose = function(){
Tone.prototype.dispose.call(this);
this._writable("fade");
this._equalPowerA.dispose();
this._equalPowerA = null;
this._equalPowerB.dispose();
Expand Down
18 changes: 10 additions & 8 deletions Tone/component/EQ.js → Tone/component/EQ3.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/signal/Signal"]
* @param {number} [midLevel=0] the gain applied to the mid (in db)
* @param {number} [highLevel=0] the gain applied to the high (in db)
* @example
* var eq = new Tone.EQ(-10, 3, -20);
* var eq = new Tone.EQ3(-10, 3, -20);
*/
Tone.EQ = function(){
Tone.EQ3 = function(){

var options = this.optionsObject(arguments, ["low", "mid", "high"], Tone.EQ.defaults);
var options = this.optionsObject(arguments, ["low", "mid", "high"], Tone.EQ3.defaults);

/**
* the output node
Expand Down Expand Up @@ -95,16 +95,17 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/signal/Signal"]
this.high.value = options.low;
this.mid.value = options.mid;
this.low.value = options.high;
this._readOnly(["low", "mid", "high", "lowFrequency", "highFrequency"]);
};

Tone.extend(Tone.EQ);
Tone.extend(Tone.EQ3);

/**
* the default values
* @type {Object}
* @static
*/
Tone.EQ.defaults = {
Tone.EQ3.defaults = {
"low" : 0,
"mid" : 0,
"high" : 0,
Expand All @@ -114,10 +115,11 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/signal/Signal"]

/**
* clean up
* @returns {Tone.EQ} `this`
* @returns {Tone.EQ3} `this`
*/
Tone.EQ.prototype.dispose = function(){
Tone.EQ3.prototype.dispose = function(){
Tone.prototype.dispose.call(this);
this._writable(["low", "mid", "high", "lowFrequency", "highFrequency"]);
this._multibandSplit.dispose();
this._multibandSplit = null;
this.lowFrequency = null;
Expand All @@ -137,5 +139,5 @@ define(["Tone/core/Tone", "Tone/component/MultibandSplit", "Tone/signal/Signal"]
return this;
};

return Tone.EQ;
return Tone.EQ3;
});
Loading

0 comments on commit 406fda6

Please sign in to comment.