File: index.html

package info (click to toggle)
faust 2.30.5~ds0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 279,348 kB
  • sloc: cpp: 239,368; javascript: 32,310; ansic: 17,442; sh: 11,925; java: 5,903; objc: 3,879; makefile: 3,030; cs: 1,139; python: 987; ruby: 951; xml: 693; yacc: 537; lex: 239; lisp: 201; awk: 110
file content (444 lines) | stat: -rw-r--r-- 18,922 bytes parent folder | download
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        
        
        
        <link rel="shortcut icon" href="../img/favicon.ico">
        <title> Contributing  - Faust Libraries</title>
        <link href="../css/bootstrap.min.css" rel="stylesheet">
        <link href="../css/font-awesome.min.css" rel="stylesheet">
        <link href="../css/base.css" rel="stylesheet">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
        <link href="../css/extra.css" rel="stylesheet">

        <script src="../js/jquery-1.10.2.min.js" defer></script>
        <script src="../js/bootstrap.min.js" defer></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
        <script>hljs.initHighlightingOnLoad();</script> 
    </head>

    <body>
        <div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
            <div class="container">
                <a class="navbar-brand" href=".."><img src="../img/faustText.svg" width="150px"> Libraries</a>
                <!-- Expander button -->
                <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
                    <span class="navbar-toggler-icon"></span>
                </button>

                <!-- Expanded navigation -->
                <div id="navbar-collapse" class="navbar-collapse collapse">
                        <!-- Main navigation -->
                        <ul class="nav navbar-nav">
                            <li class="dropdown active">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../organization/" class="dropdown-item"> Organization </a>
</li>
                                    
<li>
    <a href="../standardFunctions/" class="dropdown-item"> Standard Functions </a>
</li>
                                    
<li>
    <a href="./" class="dropdown-item active"> Contributing </a>
</li>
                                    
<li>
    <a href="../copyright/" class="dropdown-item"> Copyright/License </a>
</li>
                                </ul>
                            </li>
                            <li class="navitem">
                                <a href="../libs/" class="nav-link">Index</a>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Libraries <b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    
<li>
    <a href="../libs/analyzers/" class="dropdown-item"> analyzers </a>
</li>
                                    
<li>
    <a href="../libs/basics/" class="dropdown-item"> basics </a>
</li>
                                    
<li>
    <a href="../libs/compressors/" class="dropdown-item"> compressors </a>
</li>
                                    
<li>
    <a href="../libs/delays/" class="dropdown-item"> delays </a>
</li>
                                    
<li>
    <a href="../libs/demos/" class="dropdown-item"> demos </a>
</li>
                                    
<li>
    <a href="../libs/dx7/" class="dropdown-item"> dx7 </a>
</li>
                                    
<li>
    <a href="../libs/envelopes/" class="dropdown-item"> envelopes </a>
</li>
                                    
<li>
    <a href="../libs/filters/" class="dropdown-item"> filters </a>
</li>
                                    
<li>
    <a href="../libs/hoa/" class="dropdown-item"> hoa </a>
</li>
                                    
<li>
    <a href="../libs/interpolators/" class="dropdown-item"> interpolators </a>
</li>
                                    
<li>
    <a href="../libs/maths/" class="dropdown-item"> maths </a>
</li>
                                    
<li>
    <a href="../libs/mi/" class="dropdown-item"> mi </a>
</li>
                                    
<li>
    <a href="../libs/misceffects/" class="dropdown-item"> misceffects </a>
</li>
                                    
<li>
    <a href="../libs/oscillators/" class="dropdown-item"> oscillators </a>
</li>
                                    
<li>
    <a href="../libs/noises/" class="dropdown-item"> noises </a>
</li>
                                    
<li>
    <a href="../libs/phaflangers/" class="dropdown-item"> phaflangers </a>
</li>
                                    
<li>
    <a href="../libs/physmodels/" class="dropdown-item"> physmodels </a>
</li>
                                    
<li>
    <a href="../libs/quantizer/" class="dropdown-item"> quantizer </a>
</li>
                                    
<li>
    <a href="../libs/reducemaps/" class="dropdown-item"> reducemaps </a>
</li>
                                    
<li>
    <a href="../libs/reverbs/" class="dropdown-item"> reverbs </a>
</li>
                                    
<li>
    <a href="../libs/routes/" class="dropdown-item"> routes </a>
</li>
                                    
<li>
    <a href="../libs/signals/" class="dropdown-item"> signals </a>
</li>
                                    
<li>
    <a href="../libs/soundfiles/" class="dropdown-item"> soundfiles </a>
</li>
                                    
<li>
    <a href="../libs/spats/" class="dropdown-item"> spats </a>
</li>
                                    
<li>
    <a href="../libs/synths/" class="dropdown-item"> synths </a>
</li>
                                    
<li>
    <a href="../libs/vaeffects/" class="dropdown-item"> vaeffects </a>
</li>
                                    
<li>
    <a href="../libs/wavedigitalfilters/" class="dropdown-item"> wavedigitalfilters </a>
</li>
                                    
<li>
    <a href="../libs/webaudio/" class="dropdown-item"> webaudio </a>
</li>
                                </ul>
                            </li>
                            <li class="navitem">
                                <a href="../about/" class="nav-link">About</a>
                            </li>
                        </ul>

                    <ul class="nav navbar-nav ml-auto">
                        <li class="nav-item">
                            <a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
                                <i class="fa fa-search"></i> Search
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        
        

        <div class="container">
            <div class="row"><div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
    <div class="navbar-header">
        <button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
            <span class="fa fa-angle-down"></span>
        </button>
    </div>

    
    <div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
        <ul class="nav flex-column">
            
            <li class="nav-item" data-level="1"><a href="#contributing" class="nav-link">Contributing</a>
              <ul class="nav flex-column">
            <li class="nav-item" data-level="2"><a href="#new-functions" class="nav-link">New Functions</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#new-libraries" class="nav-link">New Libraries</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="2"><a href="#coding-conventions" class="nav-link">Coding Conventions</a>
              <ul class="nav flex-column">
            <li class="nav-item" data-level="3"><a href="#documentation" class="nav-link">Documentation</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="3"><a href="#library-import" class="nav-link">Library Import</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="3"><a href="#demo-functions" class="nav-link">"Demo" Functions</a>
              <ul class="nav flex-column">
              </ul>
            </li>
            <li class="nav-item" data-level="3"><a href="#standard-functions" class="nav-link">"Standard" Functions</a>
              <ul class="nav flex-column">
              </ul>
            </li>
              </ul>
            </li>
              </ul>
            </li>
        </ul>
    </div>
</div></div>
                    <div class="col-md-9 main-container" role="main">

<h1 id="contributing">Contributing</h1>
<p>If you wish to add a function to any of these libraries or if you plan to add a new library, make sure that you follow the following conventions:</p>
<h2 id="new-functions">New Functions</h2>
<ul>
<li>All functions must be preceded by a markdown documentation header respecting the following format (open the source code of any of the libraries for an example):</li>
</ul>
<pre><code>//-----------------functionName--------------------
// Description
//
// #### Usage
//
// ```
// Usage Example
// ```
//
// Where:
//
// * argument1: argument 1 description
//-------------------------------------------------
</code></pre>

<ul>
<li>Every time a new function is added, the documentation should be updated simply by running <code>make doclib</code>. <!-- TODO --></li>
<li>The environment system (e.g. <code>os.osc</code>) should be used when calling a function declared in another library (see the section on <em>Using the Faust Libraries</em>).</li>
<li>Try to reuse existing functions as much as possible.</li>
<li>If you have any question, send an e-mail to rmichon_at_ccrma_dot_stanford_dot_edu.</li>
</ul>
<h2 id="new-libraries">New Libraries</h2>
<ul>
<li>Any new "standard" library should be declared in <code>stdfaust.lib</code> with its own environment (2 letters - see <code>stdfaust.lib</code>).</li>
<li>Any new "standard" library must be added to <code>generateDoc</code>.</li>
<li>Functions must be organized by sections.</li>
<li>Any new library should at least <code>declare</code> a <code>name</code> and a <code>version</code>.</li>
<li>The comment based markdown documentation of each library must respect the following format (open the source code of any of the libraries for an example):</li>
</ul>
<pre><code>//############### libraryName ##################
// Description
//
// * Section Name 1
// * Section Name 2
// * ...
//
// It should be used using the `[...]` environment:
//
// ```
// [...] = library(&quot;libraryName&quot;);
// process = [...].functionCall;
// ```
//
// Another option is to import `stdfaust.lib` which already contains the `[...]`
// environment:
//
// ```
// import(&quot;stdfaust.lib&quot;);
// process = [...].functionCall;
// ```
//##############################################

//================= Section Name ===============
// Description
//==============================================
</code></pre>

<ul>
<li>If you have any question, send an e-mail to rmichon_at_ccrma_dot_stanford_dot_edu.</li>
</ul>
<h2 id="coding-conventions">Coding Conventions</h2>
<p>In order to have a uniformized library system, we established the following conventions (that hopefully will be followed by others when making modifications to them :-) ).</p>
<h3 id="documentation">Documentation</h3>
<ul>
<li>All the functions that we want to be "public" are documented.</li>
<li>We used the <code>faust2md</code> "standards" for each library: <code>//###</code> for main title (library name - equivalent to <code>#</code> in markdown), <code>//===</code> for section declarations (equivalent to <code>##</code> in markdown) and <code>//---</code> for function declarations (equivalent to <code>####</code> in markdown - see <code>basics.lib</code> for an example).</li>
<li>Sections in function documentation should be declared as <code>####</code> markdown title.</li>
<li>Each function documentation provides a "Usage" section (see <code>basics.lib</code>).</li>
</ul>
<h3 id="library-import">Library Import</h3>
<p>To prevent cross-references between libraries we generalized the use of the <code>library("")</code> system for function calls in all the libraries. This means that everytime a function declared in another library is called, the environment corresponding to this library needs to be called too. To make things easier, a <code>stdfaust.lib</code> library was created and is imported by all the libraries:</p>
<pre><code>an = library(&quot;analyzers.lib&quot;);
ba = library(&quot;basics.lib&quot;);
co = library(&quot;compressors.lib&quot;);
de = library(&quot;delays.lib&quot;);
dm = library(&quot;demos.lib&quot;);
dx = library(&quot;dx7.lib&quot;);
en = library(&quot;envelopes.lib&quot;);
fi = library(&quot;filters.lib&quot;);
ho = library(&quot;hoa.lib&quot;);
it = library(&quot;interpolators.lib&quot;);
ma = library(&quot;maths.lib&quot;);
mi = library(&quot;mi.lib&quot;);
ef = library(&quot;misceffects.lib&quot;);
os = library(&quot;oscillators.lib&quot;);
no = library(&quot;noises.lib&quot;);
pf = library(&quot;phaflangers.lib&quot;);
pm = library(&quot;physmodels.lib&quot;);
rm = library(&quot;reducemaps.lib&quot;);
re = library(&quot;reverbs.lib&quot;);
ro = library(&quot;routes.lib&quot;);
sp = library(&quot;spats.lib&quot;);
si = library(&quot;signals.lib&quot;);
so = library(&quot;soundfiles.lib&quot;);
sy = library(&quot;synths.lib&quot;);
ve = library(&quot;vaeffects.lib&quot;);
wa = library(&quot;webaudio.lib&quot;);
vl = library(&quot;version.lib&quot;);
wd = library(&quot;wavedigitalfilters.lib&quot;);
</code></pre>

<p>For example, if we wanted to use the <code>smooth</code> function which is now declared in <code>signals.lib</code>, we would do the following:</p>
<pre><code>import(&quot;stdfaust.lib&quot;);

process = si.smooth(0.999);
</code></pre>

<p>This standard is only used within the libraries: nothing prevents coders to still import <code>signals.lib</code> directly and call <code>smooth</code> without <code>ro.</code>, etc. It means symbols and function names defined within a library have to be unique to not collide with symbols of any other libraries.  </p>
<h3 id="demo-functions">"Demo" Functions</h3>
<p>"Demo" functions are placed in <code>demos.lib</code> and have a built-in user interface (UI). Their name ends with the <code>_demo</code> suffix. Each of these function have a <code>.dsp</code> file associated to them in the <code>/examples</code> folder.</p>
<p>Any function containing UI elements should be placed in this library and respect these standards.</p>
<h3 id="standard-functions">"Standard" Functions</h3>
<p>"Standard" functions are here to simplify the life of new (or not so new) Faust coders. They are declared in <code>/libraries/doc/standardFunctions.md</code> and allow to point programmers to preferred functions to carry out a specific task. For example, there are many different types of lowpass filters declared in <code>filters.lib</code> and only one of them is considered to be standard, etc.</p></div>
            </div>
        </div>

        <footer class="col-md-12">
            <hr>
                <p>Copyright &copy; 2019-2020 <a href="https://www.grame.fr">Grame-CNCM</a></p>
        </footer>
        <script>
            var base_url = "..",
                shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
        </script>
        <script src="../js/base.js" defer></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" defer></script>
        <script src="../search/main.js" defer></script>

        <div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="searchModalLabel">Search</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
                <p>
                    From here you can search these documents. Enter
                    your search terms below.
                </p>
                <form>
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
                    </div>
                </form>
                <div id="mkdocs-search-results"></div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            </div>
            <div class="modal-body">
              <table class="table">
                <thead>
                  <tr>
                    <th style="width: 20%;">Keys</th>
                    <th>Action</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td class="help shortcut"><kbd>?</kbd></td>
                    <td>Open this help</td>
                  </tr>
                  <tr>
                    <td class="next shortcut"><kbd>n</kbd></td>
                    <td>Next page</td>
                  </tr>
                  <tr>
                    <td class="prev shortcut"><kbd>p</kbd></td>
                    <td>Previous page</td>
                  </tr>
                  <tr>
                    <td class="search shortcut"><kbd>s</kbd></td>
                    <td>Search</td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>

    </body>
</html>