Skip to content

Commit

Permalink
Complete JSFX tutorial.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Sep 8, 2023
1 parent f098c92 commit 3abee49
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 18 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,5 +464,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.4.3
Build Date UTC : 2023-09-07 04:38:13.255751+00:00
Build Date UTC : 2023-09-08 14:19:23.493957+00:00
-->
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.
16 changes: 8 additions & 8 deletions docs/tutorials/jsfx/exfaust0/exfaust0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/tutorials/jsfx/exfaust1/exfaust1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions docs/tutorials/jsfx/exfaust2/exfaust2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/tutorials/jsfx/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,14 @@
</li>
<li class="nav-item" data-level="2"><a href="#using-the-faust-web-ide" class="nav-link">Using the Faust Web IDE</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="3"><a href="#generating-a-jsfx-file" class="nav-link">Generating a JSFX file</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="3"><a href="#generating-a-jsfx-file-in-polyphonic-mode" class="nav-link">Generating a JSFX file in polyphonic mode</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#limitations" class="nav-link">Limitations</a>
Expand Down Expand Up @@ -564,8 +572,11 @@ <h3 id="midi-polyphonic-example">MIDI polyphonic example</h3>
(midi_event &gt; 0) ? (control());
</code></pre>
<h2 id="using-the-faust-web-ide">Using the Faust Web IDE</h2>
<h3 id="generating-a-jsfx-file">Generating a JSFX file</h3>
<p>The JSFX backend is available on the <a href="https://faustide.grame.fr/">Faust web IDE</a>. In order to export a Faust program as JSFX code, you will need to click on the "export/compile to specific target" button (on the left side, below "Save as"). Then, you need to choose <strong><em>jsfx</em></strong> both as the platform and architecture, and click <strong><em>compile</em></strong>.<br />
This will allow your to download a <code>binary.zip</code> file, containing the resulting <strong><em>jsfx</em></strong> file and your original <strong><em>dsp</em></strong> file. </p>
<h3 id="generating-a-jsfx-file-in-polyphonic-mode">Generating a JSFX file in polyphonic mode</h3>
<p>Use the <code>declare options "[midi:on][nvoices:n]";</code> <a href="https://faustdoc.grame.fr/manual/midi/#configuring-and-activating-polyphony">convention</a> in the DSP code to activate MIDI and polyphonic mode.</p>
<h2 id="limitations">Limitations</h2>
<p>As JSFX is a sandboxed environment, this backend cannot match the full Faust potential. Some features are missing, some other might come in the future. </p>
<p>First, only three controls are available: </p>
Expand Down
7 changes: 7 additions & 0 deletions src/tutorials/jsfx.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,16 @@ while (midirecv(mpos, msg1, msg2, msg3)) (

## Using the Faust Web IDE


### Generating a JSFX file

The JSFX backend is available on the [Faust web IDE](https://faustide.grame.fr/). In order to export a Faust program as JSFX code, you will need to click on the "export/compile to specific target" button (on the left side, below "Save as"). Then, you need to choose ***jsfx*** both as the platform and architecture, and click ***compile***.
This will allow your to download a `binary.zip` file, containing the resulting ***jsfx*** file and your original ***dsp*** file.

### Generating a JSFX file in polyphonic mode

Use the `declare options "[midi:on][nvoices:n]";` [convention](https://faustdoc.grame.fr/manual/midi/#configuring-and-activating-polyphony) in the DSP code to activate MIDI and polyphonic mode.

## Limitations

As JSFX is a sandboxed environment, this backend cannot match the full Faust potential. Some features are missing, some other might come in the future.
Expand Down

0 comments on commit 3abee49

Please sign in to comment.