Skip to content

Commit

Permalink
Added simple HTML5 example to examples folder (#465)
Browse files Browse the repository at this point in the history
* Added simple HTML5 example to examples folder

* put script inside HTML <script> tags

* removed app.js
  • Loading branch information
isaacpearl authored and tambien committed Apr 2, 2019
1 parent 3c2d125 commit 2c2c45f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/simpleHtml.html
@@ -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>

0 comments on commit 2c2c45f

Please sign in to comment.