Tone.js/examples/simpleHtml.html
isaacpearl 2c2c45ff29 Added simple HTML5 example to examples folder (#465)
* Added simple HTML5 example to examples folder

* put script inside HTML <script> tags

* removed app.js
2019-04-01 23:33:07 -04:00

21 lines
516 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>App</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/tone/13.8.3/Tone.js"></script>
<script>
function playNote() {
var synth = new Tone.Synth().toMaster();
synth.triggerAttackRelease("C4", "8n");
}
</script>
</head>
<body>
<h1>Simple HTML5 Tone.js Demo</h1>
<button onclick="playNote()">Click me to play note!</button>
</body>
</html>