forked from surikov/webaudiofont
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WebAudioFontExampleDrums.html
38 lines (38 loc) · 2.65 KB
/
WebAudioFontExampleDrums.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<head>
<script src='WebAudioFontPlayer.js'></script>
<script src='webaudiofont/128.35.Power_4616.js'></script>
<script src='webaudiofont/128.40.Power_4616.js'></script>
<script src='webaudiofont/128.42.Power_4616.js'></script>
<script src='webaudiofont/128.51.Standard_32_32_460.js'></script>
<script src='webaudiofont/128.50.Standard_32_32_460.js'></script>
<script src='webaudiofont/128.48.Standard_32_32_460.js'></script>
<script src='webaudiofont/128.41.Standard_32_32_460.js'></script>
<script>
var AudioContextFunc = window.AudioContext || window.webkitAudioContext;
var audioContext = new AudioContextFunc();
var player=new WebAudioFontPlayer();
</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="img/drums.jpg" width="600" height="509"></p>
<a href="javascript:player.queueWaveTable(audioContext, audioContext.destination, _drum_Power_4616_35, 0, 35, 3);"><div class="bassStyle"> </div></a>
<a href="javascript:player.queueWaveTable(audioContext, audioContext.destination, _drum_Power_4616_40, 0, 40, 3);"><div class="snareStyle"> </div></a>
<a href="javascript:player.queueWaveTable(audioContext, audioContext.destination, _drum_Power_4616_42, 0, 42, 3);"><div class="hihatStyle"> </div></a>
<a href="javascript:player.queueWaveTable(audioContext, audioContext.destination, _drum_Standard_32_32_460_51, 0, 51, 3);"><div class="cymbalStyle"> </div></a>
<a href="javascript:player.queueWaveTable(audioContext, audioContext.destination, _drum_Standard_32_32_460_50, 0, 50, 3);"><div class="tom1Style"> </div></a>
<a href="javascript:player.queueWaveTable(audioContext, audioContext.destination, _drum_Standard_32_32_460_48, 0, 48, 3);"><div class="tom2Style"> </div></a>
<a href="javascript:player.queueWaveTable(audioContext, audioContext.destination, _drum_Standard_32_32_460_41, 0, 41, 3);"><div class="tom3Style"> </div></a>
<hr/>
<p><a href="WebAudioFontExampleAll.html">back</a></p>
</body>
</html>