JSFiddle - React, Tailwind, and code Playground

by Eve Weinberg

HTML

<script src="https://tonejs.github.io/CDN/r6/Tone.js"></script>
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>

JavaScript

var sampleURL = "http://evejweinberg.github.io/samples/Hola.wav";

var player = new Tone.Player(sampleURL).toMaster();

//trigger the start of the sample once its loaded
Tone.Buffer.on("load", function(){
	player.start();
});