<html>
<head>
<script src='https://surikov.github.io/webaudiofont/npm/dist/WebAudioFontPlayer.js'></script>
<script src='https://surikov.github.io/webaudiofontdata/sound/12835_17_JCLive_sf2_file.js'></script>
<script src='https://surikov.github.io/webaudiofontdata/sound/12840_1_JCLive_sf2_file.js'></script>
<script src='https://surikov.github.io/webaudiofontdata/sound/12842_1_JCLive_sf2_file.js'></script>
<script src='https://surikov.github.io/webaudiofontdata/sound/12851_1_JCLive_sf2_file.js'></script>
<script src='https://surikov.github.io/webaudiofontdata/sound/12850_1_JCLive_sf2_file.js'></script>
<script src='https://surikov.github.io/webaudiofontdata/sound/12848_1_JCLive_sf2_file.js'></script>
<script src='https://surikov.github.io/webaudiofontdata/sound/12841_1_JCLive_sf2_file.js'></script>
<script>
var AudioContextFunc = window.AudioContext || window.webkitAudioContext;
var audioContext = new AudioContextFunc();
var player=new WebAudioFontPlayer();
player.loader.decodeAfterLoading(audioContext, '_drum_35_17_JCLive_sf2_file');
player.loader.decodeAfterLoading(audioContext, '_drum_40_1_JCLive_sf2_file');
player.loader.decodeAfterLoading(audioContext, '_drum_42_1_JCLive_sf2_file');
player.loader.decodeAfterLoading(audioContext, '_drum_51_1_JCLive_sf2_file');
player.loader.decodeAfterLoading(audioContext, '_drum_50_1_JCLive_sf2_file');
player.loader.decodeAfterLoading(audioContext, '_drum_48_1_JCLive_sf2_file');
player.loader.decodeAfterLoading(audioContext, '_drum_41_1_JCLive_sf2_file');
</script>
<style type="text/css">
.bassStyle {position: absolute;left: 220px;top: 280px;width: 170px;height: 170px;}
.snareStyle {position: absolute;left: 393px;top: 239px;width: 140px;height: 70px;}
.hihatStyle {position: absolute;left: 463px;top: 133px;width: 143px;height: 86px;}
.cymbalStyle {position: absolute;left: 76px;top: 27px;width: 160px;height: 95px;}
.tom1Style {position: absolute;left: 308px;top: 133px;width: 127px;height: 100px;}
.tom2Style {position: absolute;left: 165px;top: 138px;width: 136px;height: 110px;}
.tom3Style {position: absolute;left: 41px;top: 255px;width: 155px;height: 164px;}
</style>
</head>
<body>
<p><img src="https://surikov.github.io/webaudiofont/img/drums.jpg" width="600" height="509"></p>
<a href="#" onmousedown="player.queueWaveTable(audioContext, audioContext.destination, _drum_35_17_JCLive_sf2_file, 0, 35, 3);"><div class="bassStyle"> </div></a>
<a href="#" onmousedown="player.queueWaveTable(audioContext, audioContext.destination, _drum_40_1_JCLive_sf2_file, 0, 40, 3);"><div class="snareStyle"> </div></a>
<a href="#" onmousedown="player.queueWaveTable(audioContext, audioContext.destination, _drum_42_1_JCLive_sf2_file, 0, 42, 3);"><div class="hihatStyle"> </div></a>
<a href="#" onmousedown="player.queueWaveTable(audioContext, audioContext.destination, _drum_51_1_JCLive_sf2_file, 0, 51, 3);"><div class="cymbalStyle"> </div></a>
<a href="#" onmousedown="player.queueWaveTable(audioContext, audioContext.destination, _drum_50_1_JCLive_sf2_file, 0, 50, 3);"><div class="tom1Style"> </div></a>
<a href="#" onmousedown="player.queueWaveTable(audioContext, audioContext.destination, _drum_48_1_JCLive_sf2_file, 0, 48, 3);"><div class="tom2Style"> </div></a>
<a href="#" onmousedown="player.queueWaveTable(audioContext, audioContext.destination, _drum_41_1_JCLive_sf2_file, 0, 41, 3);"><div class="tom3Style"> </div></a>
<hr/>
<p><a href="https://github.com/surikov/webaudiofont">source</a></p>
</body>
</html>
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |