Debian Codegraph @

src/host-web/webchuck/examples/sndbuf3/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 3: recording with WvOut then playing again
12 SinOsc s => dac => WvOut w => blackhole;
13 w.wavFilename( "newRecording.wav" );
14 repeat( 100 )
15 {
16 s.freq() * 1.01 => s.freq;
17 10::ms => now;
18 }
19 s =< dac;
20 w.closeFile();
21
22 SndBuf buf => dac;
23 "newRecording.wav" => buf.read;
24 -1 => buf.rate;
25 1 => buf.loop;
26 buf.length() => now;
27 </div>
28 </div>
29 <div class="buttons">
30 <button class="chuckButton" id="startChuck" disabled="disabled">Start ChucK</button>
31 <button class="chuckButton" id="compileButton" disabled="disabled">Compile and Run</button>
32 <button class="chuckButton" id="replaceButton" disabled="disabled">Replace</button>
33 <button class="chuckButton" id="removeButton" disabled="disabled">Remove</button>
34 <button class="chuckButton" id="clearButton" disabled="disabled">Clear VM and Globals</button>
35 <button class="chuckButton" id="micButton" disabled="disabled">Enable Microphone</button>
36 <button class="chuckButton" id="fileFormButton">Show File Uploader</button>
37 </div>
38 <div id="fileForm" class="hidden">
39 <p>File name to use in ChucK: <input type="text" id="uploadFilename"></p>
40 <p>Local file to upload: <input type="file" id="uploadFile" name="uploadFile"></p>
41 <p><button class="chuckButton" id="fileButton" disabled="disabled">Upload File to Virtual File System</button></p>
42 </div>
43 <div>
44 <textarea id="output"></textarea>
45 <div id="shreds">
46 <table id="shredstable">
47 <col width="60px">
48 <col width="1*">
49 <col width="50px">
50 <col width="60px">
51 <tr><th>shred</th><th>code</th><th>time</th><th>remove</th>
52 </table>
53 </div>
54 <div class="clearfix"></div>
55 </div>
56 <script type="text/javascript" src="../../js/ace-min-noconflict/ace.js" charset="utf-8"></script>
57 <script type="text/javascript" src="../../js/editor.js"></script>
58 <script type="text/javascript" src="../../js/defer.js"></script>
59 <script>
60 // override
61 var whereIsChuck = "../../js";
62 </script>
63 <script type="text/javascript" src="../../js/webchuck_host.js"></script>
64 <script type="text/javascript" src="../../js/host.js"></script>
65 </body>
66 </html>
67
68