Debian Codegraph @

src/host-web/webchuck/examples/sndbuf4/index.html

raw symbols SCIP
1 <!doctype html>
2 <html lang="en-us">
3 <head>
4 <meta charset="utf-8">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>ChucK + JS => ChucKScript</title>
7 <link rel="stylesheet" href="../../css/editor.css">
8 </head>
9 <body onresize="chuckEditor.resize();">
10 <div>
11 <div id="program">// SndBuf 4: user-uploaded files
12 // Enable the file uploader, upload a file to the
13 // in-browser filesystem (disappears when the page
14 // is reloaded), and go!
15 SndBuf buf => dac;
16 me.dir() + "myAudioFile.wav" => buf.read;
17 buf.length() => now;
18 </div>
19 </div>
20 <div class="buttons">
21 <button class="chuckButton" id="startChuck" disabled="disabled">Start ChucK</button>
22 <button class="chuckButton" id="compileButton" disabled="disabled">Compile and Run</button>
23 <button class="chuckButton" id="replaceButton" disabled="disabled">Replace</button>
24 <button class="chuckButton" id="removeButton" disabled="disabled">Remove</button>
25 <button class="chuckButton" id="clearButton" disabled="disabled">Clear VM and Globals</button>
26 <button class="chuckButton" id="micButton" disabled="disabled">Enable Microphone</button>
27 <button class="chuckButton" id="fileFormButton">Show File Uploader</button>
28 </div>
29 <div id="fileForm" class="hidden">
30 <p>File name to use in ChucK: <input type="text" id="uploadFilename"></p>
31 <p>Local file to upload: <input type="file" id="uploadFile" name="uploadFile"></p>
32 <p><button class="chuckButton" id="fileButton" disabled="disabled">Upload File to Virtual File System</button></p>
33 </div>
34 <div>
35 <textarea id="output"></textarea>
36 <div id="shreds">
37 <table id="shredstable">
38 <col width="60px">
39 <col width="1*">
40 <col width="50px">
41 <col width="60px">
42 <tr><th>shred</th><th>code</th><th>time</th><th>remove</th>
43 </table>
44 </div>
45 <div class="clearfix"></div>
46 </div>
47 <script type="text/javascript" src="../../js/ace-min-noconflict/ace.js" charset="utf-8"></script>
48 <script type="text/javascript" src="../../js/editor.js"></script>
49 <script type="text/javascript" src="../../js/defer.js"></script>
50 <script>
51 // override
52 var whereIsChuck = "../../js";
53 </script>
54 <script type="text/javascript" src="../../js/webchuck_host.js"></script>
55 <script type="text/javascript" src="../../js/host.js"></script>
56 <script>
57 // hint for demo
58 uploadFilename.value = "myAudioFile.wav";
59 </script>
60 </body>
61 </html>
62
63