Added simple HTML5 example to examples folder (#465)

* Added simple HTML5 example to examples folder

* put script inside HTML <script> tags

* removed app.js
This commit is contained in:
isaacpearl 2019-04-01 23:33:07 -04:00 committed by Yotam Mann
parent 3c2d1250ea
commit 2c2c45ff29

21
examples/simpleHtml.html Normal file
View file

@ -0,0 +1,21 @@
<!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>