Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs #766

Merged
merged 5 commits into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<script src="http://unpkg.com/tone"></script>
<script src="myScript.js"></script>
```

# Hello Tone
Expand Down
2 changes: 1 addition & 1 deletion Tone/component/analysis/DCMeter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ 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 at the current time. See also {@link Meter}.
*
* @example
* const meter = new Tone.DCMeter();
Expand Down
3 changes: 3 additions & 0 deletions Tone/component/analysis/Meter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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). See also {@link DCMeter}.
*
* @example
* const meter = new Tone.Meter();
Expand Down