diff --git a/README.md b/README.md index 1ed7dbf0..34e12210 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ To get all of the files in their directory structure, you can ```npm install ton ```javascript require.config({ - baseUrl: './base', + baseUrl: "./base", paths: { "Tone" : "path/to/Tone.js/Tone" } @@ -40,6 +40,18 @@ require(["Tone/core/Transport"], function(Transport){ //... ``` +You can also use the [Tone.js Build](https://raw.githubusercontent.com/TONEnoTONE/Tone.js/master/build/Tone.js) with requirejs by adding the build as a dependency in require.config + +```javascript +require.config({ + deps : ["path/to/build/Tone"], + baseUrl: "./base", +}); +//now pull in the modules individually by name +require(["Tone/instrument/Sampler"], function(Sampler){ + //... +``` + # AudioContext Tone.js creates an AudioContext when it loads and shims it for maximum browser compatibility. The AudioContext can be found at ```Tone.context``` or from within any Object extending Tone as ```this.context```.