Skip to content

Commit

Permalink
Improve -cn option description in architectures.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Oct 9, 2024
1 parent 1d058e4 commit 03b6202
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -477,5 +477,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.5.3
Build Date UTC : 2024-10-05 15:35:05.616631+00:00
Build Date UTC : 2024-10-09 08:05:42.614908+00:00
-->
8 changes: 7 additions & 1 deletion docs/manual/architectures/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="3"><a href="#changing-the-generated-class-name" class="nav-link">Changing the generated class name</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="3"><a href="#global-dsp-metadata" class="nav-link">Global DSP metadata</a>
<ul class="nav flex-column">
</ul>
Expand Down Expand Up @@ -1445,8 +1449,10 @@ <h3 id="the-base-dsp-class">The Base <code>dsp</code> Class</h3>
<li>the<code>metadata(Meta* m)</code>method can be called with a <code>Meta</code> object to decode the instance global metadata (see next section)</li>
</ul>
<p>(note that <code>FAUSTFLOAT</code> label is typically defined to be the actual type of sample: either <code>float</code> or <code>double</code> using <code>#define FAUSTFLOAT float</code> in the code for instance).</p>
<p>For a given compiled DSP program, the compiler will generate a <code>mydsp</code> subclass of <code>dsp</code> and fill the different methods (the actual name can be changed using the <code>-cn</code> option). For dynamic code producing backends like the LLVM IR, Cmajor or the Interpreter ones, the actual code (an LLVM module, a Cmajor module or a bytecode stream) is actually wrapped by some additional C++ code glue, to finally produces an <code>llvm_dsp</code> typed object (defined in the <a href="https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/llvm-dsp.h">llvm-dsp.h</a> file), a <code>cmajorpatch_dsp</code> typed object (defined in the <a href="https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/cmajorpatch-dsp.h">cmajorpatch-dsp.h</a> file) or an <code>interpreter_dsp</code> typed object (defined in <a href="https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/interpreter-dsp.h">interpreter-dsp.h</a> file), ready to be used with the <code>UI</code> and <code>audio</code> C++ classes (like the C++ generated class). See the following class diagram:</p>
<p>For a given compiled DSP program, the compiler will generate a <code>mydsp</code> subclass of <code>dsp</code> and fill the different methods. For dynamic code producing backends like the LLVM IR, Cmajor or the Interpreter ones, the actual code (an LLVM module, a Cmajor module or a bytecode stream) is actually wrapped by some additional C++ code glue, to finally produces an <code>llvm_dsp</code> typed object (defined in the <a href="https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/llvm-dsp.h">llvm-dsp.h</a> file), a <code>cmajorpatch_dsp</code> typed object (defined in the <a href="https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/cmajorpatch-dsp.h">cmajorpatch-dsp.h</a> file) or an <code>interpreter_dsp</code> typed object (defined in <a href="https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/interpreter-dsp.h">interpreter-dsp.h</a> file), ready to be used with the <code>UI</code> and <code>audio</code> C++ classes (like the C++ generated class). See the following class diagram:</p>
<p><img src="img/DSPHierarchy.png" class="mx-auto d-block" width="85%"></p>
<h3 id="changing-the-generated-class-name">Changing the generated class name</h3>
<p>By default, the generated class is <code>mydsp</code>, but can be changed using the <code>-cn new_name</code> option. Note that any <code>mydsp</code> string used in the architecture class will be automatically replaced by the <code>new_name</code> string. Thus other sections of the architecture file can possibly adapt using the <code>-cn new_name</code> renaming feature.</p>
<h3 id="global-dsp-metadata">Global DSP metadata</h3>
<p>All global metadata declaration in Faust start with <code>declare</code>, followed by a key and a string. For example:</p>
<pre><code>declare name &quot;Noise&quot;;
Expand Down
2 changes: 1 addition & 1 deletion docs/search/search_index.json

Large diffs are not rendered by default.

Binary file modified docs/sitemap.xml.gz
Binary file not shown.
6 changes: 5 additions & 1 deletion mkdocs/docs/manual/architectures.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,14 @@ The dsp class is central to the Faust architecture design:
(note that `FAUSTFLOAT` label is typically defined to be the actual type of sample: either `float` or `double` using `#define FAUSTFLOAT float` in the code for instance).
For a given compiled DSP program, the compiler will generate a `mydsp` subclass of `dsp` and fill the different methods (the actual name can be changed using the `-cn` option). For dynamic code producing backends like the LLVM IR, Cmajor or the Interpreter ones, the actual code (an LLVM module, a Cmajor module or a bytecode stream) is actually wrapped by some additional C++ code glue, to finally produces an `llvm_dsp` typed object (defined in the [llvm-dsp.h](https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/llvm-dsp.h) file), a `cmajorpatch_dsp` typed object (defined in the [cmajorpatch-dsp.h](https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/cmajorpatch-dsp.h) file) or an `interpreter_dsp` typed object (defined in [interpreter-dsp.h](https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/interpreter-dsp.h) file), ready to be used with the `UI` and `audio` C++ classes (like the C++ generated class). See the following class diagram:
For a given compiled DSP program, the compiler will generate a `mydsp` subclass of `dsp` and fill the different methods. For dynamic code producing backends like the LLVM IR, Cmajor or the Interpreter ones, the actual code (an LLVM module, a Cmajor module or a bytecode stream) is actually wrapped by some additional C++ code glue, to finally produces an `llvm_dsp` typed object (defined in the [llvm-dsp.h](https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/llvm-dsp.h) file), a `cmajorpatch_dsp` typed object (defined in the [cmajorpatch-dsp.h](https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/cmajorpatch-dsp.h) file) or an `interpreter_dsp` typed object (defined in [interpreter-dsp.h](https://github.com/grame-cncm/faust/blob/master-dev/architecture/faust/dsp/interpreter-dsp.h) file), ready to be used with the `UI` and `audio` C++ classes (like the C++ generated class). See the following class diagram:
<img src="img/DSPHierarchy.png" class="mx-auto d-block" width="85%">
### Changing the generated class name
By default, the generated class is `mydsp`, but can be changed using the `-cn new_name` option. Note that any `mydsp` string used in the architecture class will be automatically replaced by the `new_name` string. Thus other sections of the architecture file can possibly adapt using the `-cn new_name` renaming feature.
### Global DSP metadata
All global metadata declaration in Faust start with `declare`, followed by a key and a string. For example:
Expand Down

0 comments on commit 03b6202

Please sign in to comment.