JSFiddle - React, Tailwind, and code Playground
by dirkk0
HTML
<script src="https://unpkg.com/tone@latest"></script>
JavaScript
const player = new Tone.Player("https://tonejs.github.io/audio/berklee/gong_1.mp3").toDestination();
// play as soon as the buffer is loaded
Tone.loaded().then(() => {
Tone.Transport.scheduleRepeat((t) => {
player.start(t);
}, "8n");
Tone.start();
Tone.Transport.start();
})