mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-15 08:17:07 +00:00
Update README.md
This commit is contained in:
parent
ab4e677c9d
commit
7dff3d1892
1 changed files with 9 additions and 9 deletions
18
README.md
18
README.md
|
@ -29,15 +29,6 @@ var synth = new Tone.Synth().toMaster();
|
|||
synth.triggerAttackRelease("C4", "8n");
|
||||
```
|
||||
|
||||
# Starting Audio
|
||||
|
||||
Most browsers will not play _any_ audio until a user clicks something (like a play button). Execute the above example only after a users invokes `resume()` on Tone's context.
|
||||
|
||||
```javascript
|
||||
//attach a click listener to a play button
|
||||
document.querySelector('button').addEventListener('click', () => Tone.context.resume())
|
||||
```
|
||||
|
||||
#### Tone.Synth
|
||||
|
||||
[Tone.Synth](https://tonejs.github.io/docs/#Synth) is a basic synthesizer with a single [oscillator](https://tonejs.github.io/docs/#OmniOscillator) and an [ADSR envelope](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope).
|
||||
|
@ -54,6 +45,15 @@ Tone.js abstracts away the AudioContext time. Instead of defining all values in
|
|||
|
||||
[Read about Time encodings](https://github.com/Tonejs/Tone.js/wiki/Time).
|
||||
|
||||
# Starting Audio
|
||||
|
||||
Most browsers will not play _any_ audio until a user clicks something (like a play button). Execute the above example only after a users invokes `resume()` on Tone's context.
|
||||
|
||||
```javascript
|
||||
//attach a click listener to a play button
|
||||
document.querySelector('button').addEventListener('click', () => Tone.start())
|
||||
```
|
||||
|
||||
# Scheduling
|
||||
|
||||
### Transport
|
||||
|
|
Loading…
Reference in a new issue