mirror of
https://github.com/Tonejs/Tone.js
synced 2025-01-27 19:15:04 +00:00
commit
3de6c81637
3 changed files with 16 additions and 11 deletions
22
README.md
22
README.md
|
@ -12,22 +12,24 @@ Tone.js is a Web Audio framework for creating interactive music in the browser.
|
||||||
|
|
||||||
# Installation
|
# 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
|
```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
|
|
||||||
```
|
|
||||||
|
|
||||||
To import Tone.js:
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import * as Tone from 'tone'
|
import * as Tone from 'tone';
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script src="http://unpkg.com/tone"></script>
|
||||||
|
<script src="myScript.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
# Hello Tone
|
# Hello Tone
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { MeterBase, MeterBaseOptions } from "./MeterBase";
|
||||||
export type DCMeterOptions = MeterBaseOptions;
|
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
|
* @example
|
||||||
* const meter = new Tone.DCMeter();
|
* const meter = new Tone.DCMeter();
|
||||||
|
|
|
@ -14,6 +14,9 @@ export interface MeterOptions extends MeterBaseOptions {
|
||||||
/**
|
/**
|
||||||
* Meter gets the [RMS](https://en.wikipedia.org/wiki/Root_mean_square)
|
* 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.
|
* 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
|
* @example
|
||||||
* const meter = new Tone.Meter();
|
* const meter = new Tone.Meter();
|
||||||
|
|
Loading…
Reference in a new issue