Update README.md

This commit is contained in:
tambien 2019-01-09 22:30:37 -05:00
parent ab4e677c9d
commit 7dff3d1892

View file

@ -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