new hello world

This commit is contained in:
Yotam Mann 2015-06-26 01:22:16 -04:00
parent e0b6ec48ad
commit 1b722a27b1

View file

@ -43,20 +43,11 @@ It's always much safer to use a specific version rather than just "latest".
# Hello World
```javascript
//create one of Tone's built-in synthesizers
var synth = new Tone.MonoSynth();
//create one of Tone's built-in synthesizers and connect it to the master output
var synth = new Tone.SimpleSynth().toMaster();
//connect the synth to the master output channel
synth.toMaster();
//create a callback which is invoked every quarter note
Tone.Transport.setInterval(function(time){
//trigger middle C for the duration of an 8th note
synth.triggerAttackRelease("C4", "8n", time);
}, "4n");
//start the transport
Tone.Transport.start();
//play a middle c for the duratino of an 8th note
synth.triggerAttackRelease("C4", "8n");
```
# Tone.Transport