<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>StartAudioContext</title>
<script type="text/javascript" src="StartAudioContext.js"></script>
<script type="text/javascript" src="Tone.js"></script>
background-color: rgb(204, 204, 204);
background-color: #FFB729;
<span>STATUS:</span><span id="isStarted">NOT Started</span>
<div class="starterButton">Tap to start the AudioContext</div>
<div id="tonedebug"></div>
<script type="text/javascript">
//create an audio context
window.AudioContext = window.AudioContext || window.webkitAudioContext
var audioContext = new AudioContext()
StartAudioContext(Tone.context, ".starterButton").then(function(){
document.querySelector("#isStarted").textContent = "Started";
seq = new Tone.Sequence(function(time, note){
document.querySelector("#tonedebug").textContent = note;
}, ["C4", ["E4", "G4"], "A4"], "4n");