Skip to content

Instantly share code, notes, and snippets.

@muhibbudins
Last active November 11, 2017 02:08
Show Gist options
  • Save muhibbudins/acfd2e8a8c0d958d25d192543e9abe00 to your computer and use it in GitHub Desktop.
Save muhibbudins/acfd2e8a8c0d958d25d192543e9abe00 to your computer and use it in GitHub Desktop.
Script for Audio Context Tutorial at my medium account (https://medium.com/@muhibbudins)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SoundWave</title>
<style>
canvas {
background-color: #101010;
width: 600px;
height: 300px;
transform: scale(-1, -1);
}
audio {
width: 600px;
}
</style>
</head>
<body>
<div class="wrapper">
<canvas id="visualizer"></canvas>
<audio src="" id="player" controls="true"></audio>
<div>Choose Song :
<input type="file" id="source">
</div>
<div>Song Name : <span id="song_name"></span></div>
<div>Format : <span id="song_format"></span></div>
</div>
<script type="text/javascript">
// do stuff
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment