From ece5d1444e4258f5d61fcfb1c7f5172a1df3a975 Mon Sep 17 00:00:00 2001 From: cjwit Date: Fri, 23 Oct 2020 13:19:29 -0400 Subject: [PATCH 1/5] Add HTML script tag as installation option --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c5bce9af5..bf19c1209 100644 --- a/README.md +++ b/README.md @@ -12,22 +12,24 @@ Tone.js is a Web Audio framework for creating interactive music in the browser. # Installation -To install the latest stable version. +There are two ways to incorporate Tone.js into a proejct. First, it can be installed locally into a project using `npm`: ```bash -npm install tone +npm install tone // Install the latest stable version +npm install tone@next // Or, alternatively, use the 'next' version ``` -Or to install the 'next' version +Add Tone.js to a project using the JavaScript `import` syntax: -```bash -npm install tone@next +```js +import * as Tone from 'tone'; ``` -To import Tone.js: +Tone.js is also hosted at unpkg.com. It can be added directly within an HTML document, as long as it precedes any project scripts. [See the example here](https://github.com/Tonejs/Tone.js/blob/master/examples/simpleHtml.html) for more details. -```js -import * as Tone from 'tone' +```html + + ``` # Hello Tone From 7799b0ede4cdda34810c2a3955b84bd4f69ee14c Mon Sep 17 00:00:00 2001 From: cjwit Date: Fri, 23 Oct 2020 13:42:01 -0400 Subject: [PATCH 2/5] Add output description and example link to Meter --- Tone/component/analysis/Meter.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tone/component/analysis/Meter.ts b/Tone/component/analysis/Meter.ts index d90ceb7c9..50d0f8d16 100644 --- a/Tone/component/analysis/Meter.ts +++ b/Tone/component/analysis/Meter.ts @@ -14,6 +14,9 @@ export interface MeterOptions extends MeterBaseOptions { /** * Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square) * of an input signal. It can also get the raw value of the input signal. + * Setting `normalRange` to `true` will covert the output to a range of + * 0-1. See an example using a graphical display + * [here](https://tonejs.github.io/examples/meter). * * @example * const meter = new Tone.Meter(); From b5128769c8151c518799b240b0189246db7d343a Mon Sep 17 00:00:00 2001 From: cjwit Date: Fri, 23 Oct 2020 13:50:00 -0400 Subject: [PATCH 3/5] Add detail and link to Meter in DCMeter --- Tone/component/analysis/DCMeter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tone/component/analysis/DCMeter.ts b/Tone/component/analysis/DCMeter.ts index f2fad8d05..e629908e1 100644 --- a/Tone/component/analysis/DCMeter.ts +++ b/Tone/component/analysis/DCMeter.ts @@ -4,7 +4,9 @@ import { MeterBase, MeterBaseOptions } from "./MeterBase"; export type DCMeterOptions = MeterBaseOptions; /** - * DCMeter gets the raw value of the input signal at the current time. + * DCMeter gets the raw value of the input signal's waveform amplitude + * at the current time and displays it as a value between 0 and 1. + * See also {@link Meter}. * * @example * const meter = new Tone.DCMeter(); From cb14344b8f4353c38c297abe82794d52057a2b57 Mon Sep 17 00:00:00 2001 From: cjwit Date: Fri, 23 Oct 2020 13:51:08 -0400 Subject: [PATCH 4/5] Add link from Meter to DCMeter --- Tone/component/analysis/Meter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tone/component/analysis/Meter.ts b/Tone/component/analysis/Meter.ts index 50d0f8d16..6d08e3725 100644 --- a/Tone/component/analysis/Meter.ts +++ b/Tone/component/analysis/Meter.ts @@ -16,7 +16,7 @@ export interface MeterOptions extends MeterBaseOptions { * of an input signal. It can also get the raw value of the input signal. * Setting `normalRange` to `true` will covert the output to a range of * 0-1. See an example using a graphical display - * [here](https://tonejs.github.io/examples/meter). + * [here](https://tonejs.github.io/examples/meter). See also {@link DCMeter}. * * @example * const meter = new Tone.Meter(); From fb4904da65b91be4fc7c6ec423ee59f7612698d6 Mon Sep 17 00:00:00 2001 From: cjwit Date: Sun, 25 Oct 2020 19:39:14 -0400 Subject: [PATCH 5/5] Revise DCMeter doc changes --- Tone/component/analysis/DCMeter.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Tone/component/analysis/DCMeter.ts b/Tone/component/analysis/DCMeter.ts index e629908e1..d36c9ed89 100644 --- a/Tone/component/analysis/DCMeter.ts +++ b/Tone/component/analysis/DCMeter.ts @@ -4,9 +4,7 @@ import { MeterBase, MeterBaseOptions } from "./MeterBase"; export type DCMeterOptions = MeterBaseOptions; /** - * DCMeter gets the raw value of the input signal's waveform amplitude - * at the current time and displays it as a value between 0 and 1. - * See also {@link Meter}. + * DCMeter gets the raw value of the input signal at the current time. See also {@link Meter}. * * @example * const meter = new Tone.DCMeter();