Skip to content

Instantly share code, notes, and snippets.

@woosungchu
Created June 29, 2020 02:07
Show Gist options
  • Save woosungchu/973a7fae70828bc106fe697134f487d6 to your computer and use it in GitHub Desktop.
Save woosungchu/973a7fae70828bc106fe697134f487d6 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tone/14.7.12/Tone.js"></script>
<script type="text/javascript">
//create a synth and connect it to the master output (your speakers)
const synth = new Tone.Synth().toMaster();
//play a middle 'C' for the duration of an 8th note
synth.triggerAttackRelease("C4", "8n");
</script>
</head>
<body>
https://github.com/Tonejs/Tone.js/
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment