Skip to content

Commit

Permalink
Regenerated.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Jun 26, 2024
1 parent 0777adf commit e7439fa
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,5 +384,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.4.3
Build Date UTC : 2024-06-21 15:47:35.353943+00:00
Build Date UTC : 2024-06-26 21:27:57.376679+00:00
-->
14 changes: 7 additions & 7 deletions docs/libs/basics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1466,9 +1466,9 @@ <h4 id="usage_47">Usage</h4>
</code></pre>
<p>Where:</p>
<ul>
<li><code>BUS_SIZE</code>: The number of outputs from each bus (int, known at compile time).</li>
<li><code>NUM_BUSES</code>: The number of buses (int, known at compile time).</li>
<li><code>id</code>: The index of the bus to select (int, <code>0&lt;=id&lt;NUM_BUSES</code>)</li>
<li><code>BUS_SIZE</code>: number of outputs from each bus (int, known at compile time).</li>
<li><code>NUM_BUSES</code>: number of buses (int, known at compile time).</li>
<li><code>id</code>: index of the bus to select (int, <code>0&lt;=id&lt;NUM_BUSES</code>)</li>
</ul>
<hr />
<h3 id="baselectxbus"><code>(ba.)selectxbus</code></h3>
Expand All @@ -1479,10 +1479,10 @@ <h4 id="usage_48">Usage</h4>
</code></pre>
<p>Where:</p>
<ul>
<li><code>BUS_SIZE</code>: The number of outputs from each bus (int, known at compile time).</li>
<li><code>NUM_BUSES</code>: The number of buses (int, known at compile time).</li>
<li><code>fade</code>: The number of samples for the crossfade.</li>
<li><code>id</code>: The index of the bus to select (int, <code>0&lt;=id&lt;NUM_BUSES</code>)</li>
<li><code>BUS_SIZE</code>: number of outputs from each bus (int, known at compile time).</li>
<li><code>NUM_BUSES</code>: number of buses (int, known at compile time).</li>
<li><code>fade</code>: number of samples for the crossfade.</li>
<li><code>id</code>: index of the bus to select (int, <code>0&lt;=id&lt;NUM_BUSES</code>)</li>
</ul>
<hr />
<h3 id="baselectmulti"><code>(ba.)selectmulti</code></h3>
Expand Down
5 changes: 4 additions & 1 deletion docs/libs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,10 @@ <h2 id="signals">signals</h2>
<a href="signals/#sicconj">(si.)cconj</a> &nbsp; &nbsp;
<a href="signals/#sionepoleswitching">(si.)onePoleSwitching</a> &nbsp; &nbsp;
<a href="signals/#sirev">(si.)rev</a> &nbsp; &nbsp;
<a href="signals/#sivecop">(si.)vecOp</a> &nbsp; &nbsp;</p>
<a href="signals/#sivecop">(si.)vecOp</a> &nbsp; &nbsp;
<a href="signals/#sibpar">(si.)bpar</a> &nbsp; &nbsp;
<a href="signals/#sibsum">(si.)bsum</a> &nbsp; &nbsp;
<a href="signals/#sibprod">(si.)bprod</a> &nbsp; &nbsp;</p>
<h2 id="soundfiles">soundfiles</h2>
<p><a href="soundfiles/#soloop">(so.)loop</a> &nbsp; &nbsp;
<a href="soundfiles/#soloop_speed">(so.)loop_speed</a> &nbsp; &nbsp;
Expand Down
62 changes: 62 additions & 0 deletions docs/libs/signals/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,18 @@
<li class="nav-item" data-level="3"><a href="#sivecop" class="nav-link">(si.)vecOp</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="3"><a href="#sibpar" class="nav-link">(si.)bpar</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="3"><a href="#sibsum" class="nav-link">(si.)bsum</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="3"><a href="#sibprod" class="nav-link">(si.)bprod</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
Expand Down Expand Up @@ -592,6 +604,56 @@ <h4 id="where">Where</h4>
delVec = par(i, N, (i + 1) * 3);
process = vecOp((si.bus(N) , si.bus(N)), +) ~
vecOp((vecOp((ro.hadamard(N) , coeffVec), *) , delVec), @);
</code></pre>
<hr />
<h3 id="sibpar"><code>(si.)bpar</code></h3>
<p>Balanced <code>par</code> where the repeated expression doesn't depend on a variable.
The built-in <code>par</code> is implemented as an unbalanced tree, and also has
to substitute the variable into the repeated expression, which is expensive
even when the variable doesn't appear. This version is implemented as a
balanced tree (which allows node reuse during tree traversal) and also
doesn't search for the variable. This can be much faster than <code>par</code> to compile.</p>
<h4 id="usage_17">Usage</h4>
<pre><code>si.bus(N * inputs(f)) : bpar(N, f) : si.bus(N * outputs(f))
</code></pre>
<p>Where:</p>
<ul>
<li><code>N</code>: number of repetitions, minimum 1, a constant numerical expression</li>
<li><code>f</code>: an arbitrary expression</li>
</ul>
<p>Example:</p>
<pre><code>// square each of 4000 inputs
process = si.bpar(4000, (_ &lt;: _, _ : *));
</code></pre>
<hr />
<h3 id="sibsum"><code>(si.)bsum</code></h3>
<p>Balanced <code>sum</code>, see <code>si.bpar</code>.</p>
<h4 id="usage_18">Usage</h4>
<pre><code>si.bus(N * inputs(f)) : bsum(N, f) : _
</code></pre>
<p>Where:</p>
<ul>
<li><code>N</code>: number of repetitions, minimum 1, a constant numerical expression</li>
<li><code>f</code>: an arbitrary expression with 1 output.</li>
</ul>
<p>Example:</p>
<pre><code>// square each of 1000 inputs and add the results
process = si.bsum(1000, (_ &lt;: _, _ : *));
</code></pre>
<hr />
<h3 id="sibprod"><code>(si.)bprod</code></h3>
<p>Balanced <code>prod</code>, see <code>si.bpar</code>.</p>
<h4 id="usage_19">Usage</h4>
<pre><code>si.bus(N * inputs(f)) : bprod(N, f) : _
</code></pre>
<p>Where:</p>
<ul>
<li><code>N</code>: number of repetitions, minimum 1, a constant numerical expression</li>
<li><code>f</code>: an arbitrary expression with 1 output.</li>
</ul>
<p>Example:</p>
<pre><code>// Add 8000 consecutive inputs (in pairs) and multiply the results
process = si.bprod(4000, +);
</code></pre></div>
</div>
</div>
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.
16 changes: 8 additions & 8 deletions signals.lib
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ma = library("maths.lib");
si = library("signals.lib");

declare name "Faust Signal Routing Library";
declare version "1.5.0";
declare version "1.6.0";

//=============================Functions Reference========================================
//========================================================================================
Expand Down Expand Up @@ -569,14 +569,12 @@ vecOp(vectorsList, op) =
vecLen = outputs(ba.take(1, vectorsList));
};


/*
Balanced par, sum, and prod, faster versions of built-in par, sum, prod
when the repeated expression doesn't depend on the variable.
*/

// -----------------------------`(si.)bpar`---------------------------------
//
//-------------`(si.)bpar`---------------
// Balanced `par` where the repeated expression doesn't depend on a variable.
// The built-in `par` is implemented as an unbalanced tree, and also has
// to substitute the variable into the repeated expression, which is expensive
Expand All @@ -600,6 +598,8 @@ when the repeated expression doesn't depend on the variable.
// // square each of 4000 inputs
// process = si.bpar(4000, (_ <: _, _ : *));
// ```
//
//------------------------------------------
declare bpar author "Haggai Nuchi";
declare bpar copyright "Copyright (C) 2024 Haggai Nuchi <[email protected]>";
declare bpar license "MIT License";
Expand All @@ -609,8 +609,7 @@ bpar(N, f) = bpar(left, f), bpar(right, f) with {
right = N - left;
};

// -----------------------------`(si.)bsum`---------------------------------
//
//-------------`(si.)bsum`---------------
// Balanced `sum`, see `si.bpar`.
//
// #### Usage
Expand All @@ -629,6 +628,7 @@ bpar(N, f) = bpar(left, f), bpar(right, f) with {
// // square each of 1000 inputs and add the results
// process = si.bsum(1000, (_ <: _, _ : *));
// ```
//----------------------------------------------------
declare bsum author "Haggai Nuchi";
declare bsum copyright "Copyright (C) 2024 Haggai Nuchi <[email protected]>";
declare bsum license "MIT License";
Expand All @@ -638,8 +638,7 @@ bsum(N, f) = bsum(left, f) + bsum(right, f) with {
right = N - left;
};

// -----------------------------`(si.)bprod`--------------------------------
//
//-------------`(si.)bprod`---------------
// Balanced `prod`, see `si.bpar`.
//
// #### Usage
Expand All @@ -658,6 +657,7 @@ bsum(N, f) = bsum(left, f) + bsum(right, f) with {
// // Add 8000 consecutive inputs (in pairs) and multiply the results
// process = si.bprod(4000, +);
// ```
//----------------------------------------------------
declare bprod author "Haggai Nuchi";
declare bprod copyright "Copyright (C) 2024 Haggai Nuchi <[email protected]>";
declare bprod license "MIT License";
Expand Down
2 changes: 1 addition & 1 deletion version.lib
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
//------------------------------------------------------------
version = 2, // MAJOR version when we make incompatible API changes,
38, // MINOR version when we add functionality in a backwards compatible manner,
39, // MINOR version when we add functionality in a backwards compatible manner,
0; // PATCH version when we make backwards compatible bug fixes.


0 comments on commit e7439fa

Please sign in to comment.