Timing in seconds

Homepage example

by yotammann

HTML

<script src="https://tonejs.github.io/Logo/build/Waveform.js"></script>
<script src="https://tonejs.github.io/build/Tone.min.js"></script>

CSS

body {
  width: 100%;
  height: 100%;
}

JavaScript

var synth = new Tone.FMSynth().toMaster()

//schedule a series of notes, one per second
synth.triggerAttackRelease('C4', 0.5, 0)
synth.triggerAttackRelease('E4', 0.5, 1)
synth.triggerAttackRelease('G4', 0.5, 2)
synth.triggerAttackRelease('B4', 0.5, 3)