Ignore .o, .a, and .svg files.
[Faustine.git] / documentation / Interpreter.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="style.css" type="text/css">
5 <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
6 <link rel="Start" href="index.html">
7 <link rel="previous" href="Faustexp.html">
8 <link rel="next" href="Preprocess.html">
9 <link rel="Up" href="index.html">
10 <link title="Index of types" rel=Appendix href="index_types.html">
11 <link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
12 <link title="Index of values" rel=Appendix href="index_values.html">
13 <link title="Index of modules" rel=Appendix href="index_modules.html">
14 <link title="Types" rel="Chapter" href="Types.html">
15 <link title="Parser" rel="Chapter" href="Parser.html">
16 <link title="Lexer" rel="Chapter" href="Lexer.html">
17 <link title="Value" rel="Chapter" href="Value.html">
18 <link title="Signal" rel="Chapter" href="Signal.html">
19 <link title="Faustexp" rel="Chapter" href="Faustexp.html">
20 <link title="Interpreter" rel="Chapter" href="Interpreter.html">
21 <link title="Preprocess" rel="Chapter" href="Preprocess.html">
22 <link title="Main" rel="Chapter" href="Main.html"><title>Interpreter</title>
23 </head>
24 <body>
25 <div class="navbar"><a href="Faustexp.html">Previous</a>
26 &nbsp;<a href="index.html">Up</a>
27 &nbsp;<a href="Preprocess.html">Next</a>
28 </div>
29 <center><h1>Module <a href="type_Interpreter.html">Interpreter</a></h1></center>
30 <br>
31 <pre><span class="keyword">module</span> Interpreter: <code class="code">sig</code> <a href="Interpreter.html">..</a> <code class="code">end</code></pre>Module: Interpreter
32 Description: input beam -&gt; process -&gt; output beam<br>
33 <b>Author(s):</b> WANG Haisheng
34 Created: 15/05/2013 Modified: 04/06/2013<br>
35 <hr width="100%">
36 <pre><span id="EXCEPTIONEvaluation_Error"><span class="keyword">exception</span> Evaluation_Error</span> <span class="keyword">of</span> <code class="type">string</code></pre>
37 <div class="info">
38 Exception raised during interpretation of faust process.<br>
39 </div>
40 <br><code><span id="TYPEinterpreter_macro"><span class="keyword">type</span> <code class="type"></code>interpreter_macro</span> = </code><table class="typetable">
41 <tr>
42 <td align="left" valign="top" >
43 <code><span class="keyword">|</span></code></td>
44 <td align="left" valign="top" >
45 <code><span class="constructor">Number_samples_int</span></code></td>
46
47 </tr>
48 <tr>
49 <td align="left" valign="top" >
50 <code><span class="keyword">|</span></code></td>
51 <td align="left" valign="top" >
52 <code><span class="constructor">Max_Eval_Time_int</span></code></td>
53
54 </tr></table>
55
56 <div class="info">
57 Macro constants of this file.<br>
58 </div>
59
60 <pre><span id="VALinterpreter_macro_to_value"><span class="keyword">val</span> <a href="code_VALInterpreter.interpreter_macro_to_value.html">interpreter_macro_to_value</a></span> : <code class="type"><a href="Interpreter.html#TYPEinterpreter_macro">interpreter_macro</a> -> int</code></pre><div class="info">
61 val interpreter_macro_to_value : returns the value associated with the macro.<br>
62 </div>
63 <pre><span id="VALfun_array_to_fun"><span class="keyword">val</span> <a href="code_VALInterpreter.fun_array_to_fun.html">fun_array_to_fun</a></span> : <code class="type">('a -> 'b) array -> 'a -> 'b array</code></pre><div class="info">
64 val func_of_func_array : (int -&gt; value) array -&gt; (int -&gt; value array),
65 applies the same int parameter to each element of function array,
66 produces a value array.<br>
67 </div>
68 <pre><span id="VALcomputing"><span class="keyword">val</span> <a href="code_VALInterpreter.computing.html">computing</a></span> : <code class="type">(int -> <a href="Types.html#TYPEvalue">Types.value</a> array) -> int -> int -> float array array array</code></pre><div class="info">
69 val computing : (int -&gt; value array) -&gt; int -&gt; int -&gt; float array array array,
70 applies time sequence "0,1,2,3,...,max" to signal beam,
71 returns primitive output data.<br>
72 </div>
73 <pre><span id="VALmatrix_transpose"><span class="keyword">val</span> <a href="code_VALInterpreter.matrix_transpose.html">matrix_transpose</a></span> : <code class="type">'a array array -> int -> 'a array array</code></pre><div class="info">
74 val matrix_transpose : 'a array array -&gt; 'a array array,
75 transposes the input matrix.<br>
76 </div>
77 <pre><span id="VALchannels"><span class="keyword">val</span> <a href="code_VALInterpreter.channels.html">channels</a></span> : <code class="type">'a array array array -> int -> int array</code></pre><div class="info">
78 val channels : 'a array array array -&gt; int -&gt; int array,
79 returns an array of number of channels.<br>
80 </div>
81 <pre><span id="VALarrange"><span class="keyword">val</span> <a href="code_VALInterpreter.arrange.html">arrange</a></span> : <code class="type">'a array array array -> int -> 'a array list</code></pre><div class="info">
82 val arrange : 'a array array array -&gt; int -&gt; 'a array list,
83 arranges the output data in "array list" form.<br>
84 </div>
85 <pre><span id="VALcompute"><span class="keyword">val</span> <a href="code_VALInterpreter.compute.html">compute</a></span> : <code class="type">(int -> <a href="Types.html#TYPEvalue">Types.value</a>) list -> int list * float array list</code></pre><div class="info">
86 val compute : (int -&gt; value) list -&gt; (int list) * (float array list).
87 input: a list of signal functions
88 output: channel number list, data list.<br>
89 </div>
90 <pre><span id="VALsublist"><span class="keyword">val</span> <a href="code_VALInterpreter.sublist.html">sublist</a></span> : <code class="type">'a list -> int -> int -> 'a list</code></pre><div class="info">
91 val sublist : 'a list -&gt; int -&gt; int -&gt; 'a list,
92 <code class="code">sublist l start length</code>, returns the sublist of list 'l',
93 from index 'start', with length 'length'.<br>
94 </div>
95 <pre><span id="VALmake_beam"><span class="keyword">val</span> <a href="code_VALInterpreter.make_beam.html">make_beam</a></span> : <code class="type">'a list * float array list -> ('a * (int -> <a href="Types.html#TYPEvalue">Types.value</a>)) list</code></pre><div class="info">
96 val make_beam : (int list) * (float array list) -&gt; (int * (int -&gt; value)) list,
97 input: (sample rate list, data list)
98 output: beam = (sample rate, function) list<br>
99 </div>
100 <pre><span id="VALinterpret_const"><span class="keyword">val</span> <a href="code_VALInterpreter.interpret_const.html">interpret_const</a></span> : <code class="type">'a -> 'b list -> (int * ('c -> 'a)) list</code></pre><div class="info">
101 val interpret_const : value -&gt; beam -&gt; beam, generates constant signal with frequency 0.<br>
102 </div>
103 <pre><span id="VALinterpret_ident"><span class="keyword">val</span> <a href="code_VALInterpreter.interpret_ident.html">interpret_ident</a></span> : <code class="type"><a href="Types.html#TYPEsymbol">Types.symbol</a> -><br> (int * (int -> <a href="Types.html#TYPEvalue">Types.value</a>)) list -> (int * (int -> <a href="Types.html#TYPEvalue">Types.value</a>)) list</code></pre><div class="info">
104 val interpret_ident : string -&gt; beam -&gt; beam,
105 generates signals according to identified symbols.<br>
106 </div>
107 <pre><span id="VALeval"><span class="keyword">val</span> <a href="code_VALInterpreter.eval.html">eval</a></span> : <code class="type"><a href="Types.html#TYPEfaust_exp">Types.faust_exp</a> -><br> <a href="Types.html#TYPEdimension">Types.dimension</a> -><br> (int * (int -> <a href="Types.html#TYPEvalue">Types.value</a>)) list -> (int * (int -> <a href="Types.html#TYPEvalue">Types.value</a>)) list</code></pre><div class="info">
108 val rec eval : faust_exp -&gt; beam -&gt; beam,
109 main interpretation work is done here.<br>
110 </div>
111 <pre><span id="VALextract_rate"><span class="keyword">val</span> <a href="code_VALInterpreter.extract_rate.html">extract_rate</a></span> : <code class="type">(int * 'a) list -> int list</code></pre><div class="info">
112 val extract_rate : (int * (int -&gt; value)) list -&gt; int list,
113 gets the sample rate list from beam.<br>
114 </div>
115 <pre><span id="VALinterpreter"><span class="keyword">val</span> <a href="code_VALInterpreter.interpreter.html">interpreter</a></span> : <code class="type"><a href="Types.html#TYPEfaust_exp">Types.faust_exp</a> -><br> int list * float array list -> int list * int list * float array list</code></pre><div class="info">
116 val interpreter : faust_exp -&gt; (int list) * (float array list) -&gt;
117 (int list) * (int list) * (float array list)
118 input: faust expression, sample rate list * input data list
119 output: channel list * sample rate list * output data list.<br>
120 </div>
121 </body></html>