-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
65 lines (58 loc) · 3.49 KB
/
index.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>JavaScript Munching Tunes by Jalb</title>
<meta name="author" content="Jean-Alain Le Borgne jalb@pobox.com">
<meta description="A Javascript version of the Munching Tunes multimedia hack">
<link rel="stylesheet" href="munchingsquares2.css"/>
<!-- polyfill -->
<script src="midi_js/inc/shim/Base64.js" type="text/javascript"></script>
<script src="midi_js/inc/shim/Base64binary.js" type="text/javascript"></script>
<script src="midi_js/inc/shim/WebAudioAPI.js" type="text/javascript"></script>
<!-- midi.js package -->
<script src="midi_js/js/midi/audioDetect.js" type="text/javascript"></script>
<script src="midi_js/js/midi/gm.js" type="text/javascript"></script>
<script src="midi_js/js/midi/loader.js" type="text/javascript"></script>
<script src="midi_js/js/midi/plugin.audiotag.js" type="text/javascript"></script>
<script src="midi_js/js/midi/plugin.webaudio.js" type="text/javascript"></script>
<script src="midi_js/js/midi/plugin.webmidi.js" type="text/javascript"></script>
<!-- utils -->
<script src="midi_js/js/util/dom_request_xhr.js" type="text/javascript"></script>
<script src="midi_js/js/util/dom_request_script.js" type="text/javascript"></script>
<script type="text/javascript" src="log4javascript.js"></script>
<script type="text/javascript" src="canvas.js"></script>
<script type="text/javascript" src="munchingsquares2.js"></script>
<script type="text/javascript">
//<![CDATA[
// Create the logger
var log = log4javascript.getLogger();
// Create a PopUpAppender with default options
var popUpAppender = new log4javascript.PopUpAppender();
// Change the desired configuration options
popUpAppender.setFocusPopUp(true);
popUpAppender.setNewestMessageAtTop(true);
// Add the appender to the logger
log.addAppender(popUpAppender);
console.log("munchingsquares2.js version:", munchingsquares2.version);
//]]>
</script>
</head>
<body>
<h1>JavaScript Munching Tunes by Jalb</h1>
<table border="0"><tr><br><br><td></td></tr><tr><td> </td><td>
<canvas class="Canvas" id="canvas" width="256" height="256"></canvas>
</td></tr></table>
<form name="TheForm" class="Form">
Seed: <input type="text" name="Seed" value="127" maxlength=6 size=6 />
<INPUT type="button" name="Start" value="Start" onClick="StartMunchingSquares(TheForm.Seed.value)">
<INPUT type="button" name="Stop" value="Stop" onClick="StopMunchingSquares()">
</form>
<span class="Thanks">
<p>Javascript MIDI interface: <a href="https://github.com/mudcube/MIDI.js">mudcube's MIDI.js library</a></p><br>
<p>Javascript graphics: <a href="http://developer.mozilla.org/en/docs/Drawing_Graphics_with_Canvas">Canvas</a> with IE compatibility by <a href="http://me.eae.net/archive/2005/12/29/canvas-in-ie/">Emil A. Eklund</a></p><br>
<p>HSL to RGB color conversion by <a href="http://www.sharewonders.com/archives/2006/04/13/javascript-hsl-and-rgb-conversion-functions/">Bjorn Tipling</a></p><br>
<p>For debugging I used the excellent <a href="http://www.timdown.co.uk/log4javascript/">log4javascript</a></p><br>
<p>Original algorithm reference: M. Beeler, R.W. Gosper and R. Schroeppel: "HAKMEM", AIM-239, MIT AI Lab, February 1972. <a href="https://dspace.mit.edu/handle/1721.1/6086">https://dspace.mit.edu/handle/1721.1/6086</a></p><br>
</span>
</body>
</html>