Tone.JS Test Tone

I’m currently trying to learn more about Tone.JS, a wrapper library around WebAudio API. My…

I’m currently trying to learn more about Tone.JS, a wrapper library around WebAudio API. My hope is to eventually create procedural music experiences right on my website. WebAudio API is a node-based render graph, like most DSP graphs, and supports sample accurate clock timing.

The below button contains the following test code from the Tone.JS online docs:

JavaScript
<script>
	function playNote() {
		// create a synth
		const synth = new Tone.Synth().toDestination();
		// play a note from that synth
		synth.triggerAttackRelease("C4", "8n");
	}
</script>

<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" onclick="playNote()">Play Test Note</a></div>

I’m looking forward to learning more. If you’re also interested in learning about Tone.JS, check out: https://tonejs.github.io/

Leave the first comment