mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-30 21:48:45 +00:00
2c2c45ff29
* Added simple HTML5 example to examples folder * put script inside HTML <script> tags * removed app.js
21 lines
516 B
HTML
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>
|
|
|