Skip to content

Commit

Permalink
Correct documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Dec 31, 2023
1 parent c43e2b3 commit 86cbea3
Show file tree
Hide file tree
Showing 5 changed files with 16 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 @@ -384,5 +384,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.4.3
Build Date UTC : 2023-12-31 12:01:13.538543+00:00
Build Date UTC : 2023-12-31 17:52:04.278582+00:00
-->
13 changes: 6 additions & 7 deletions docs/libs/synths/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ <h4 id="usage">Usage</h4>
</code></pre>
<p>Where:</p>
<ul>
<li><code>freq</code>: the resonance frequency of the instrument</li>
<li><code>freq</code>: the resonance frequency of the instrument in Hz</li>
<li><code>q</code>: the q of the res filter (typically, 5 is a good value)</li>
<li><code>gate</code>: the trigger signal (0 or 1)</li>
</ul>
Expand All @@ -298,7 +298,7 @@ <h4 id="usage_1">Usage</h4>
</code></pre>
<p>Where:</p>
<ul>
<li><code>freq</code>: frequency of the sawtooth</li>
<li><code>freq</code>: frequency of the sawtooth in Hz</li>
<li><code>ctFreq</code>: cutoff frequency of the filter</li>
<li><code>q</code>: Q of the filter</li>
<li><code>gate</code>: the trigger signal (0 or 1)</li>
Expand All @@ -308,12 +308,11 @@ <h3 id="sysawtrombone"><code>(sy.)sawTrombone</code></h3>
<p>A simple trombone based on a lowpassed sawtooth wave.
<code>sawTrombone</code> is a standard Faust function.</p>
<h4 id="usage_2">Usage</h4>
<pre><code>sawTrombone(att,freq,gain,gate) : _
<pre><code>sawTrombone(freq,gain,gate) : _
</code></pre>
<p>Where:</p>
<ul>
<li><code>att</code>: exponential attack duration in s (typically 0.01)</li>
<li><code>freq</code>: the frequency</li>
<li><code>freq</code>: the frequency in Hz</li>
<li><code>gain</code>: the gain (0-1)</li>
<li><code>gate</code>: the gate (0 or 1)</li>
</ul>
Expand All @@ -326,7 +325,7 @@ <h4 id="usage_3">Usage</h4>
</code></pre>
<p>Where:</p>
<ul>
<li><code>freq</code>: the frequency of the string</li>
<li><code>freq</code>: the frequency of the string in Hz</li>
<li><code>res</code>: string T60 (resonance time) in second</li>
<li><code>gate</code>: trigger signal (0 or 1)</li>
</ul>
Expand All @@ -339,7 +338,7 @@ <h4 id="usage_4">Usage</h4>
</code></pre>
<p>Where:</p>
<ul>
<li><code>freq</code>: the resonance frequency of the drum</li>
<li><code>freq</code>: the resonance frequency of the drum in Hz</li>
<li><code>freqRatio</code>: a list of ratio to choose the frequency of the mode in
function of <code>freq</code> e.g.(1 1.2 1.5 ...). The first element should always
be one (fundamental).</li>
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.
17 changes: 8 additions & 9 deletions synths.lib
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ declare version "1.1.0";
//
// Where:
//
// * `freq`: the resonance frequency of the instrument
// * `freq`: the resonance frequency of the instrument in Hz
// * `q`: the q of the res filter (typically, 5 is a good value)
// * `gate`: the trigger signal (0 or 1)
//----------------------------------------------------------------------------------------
Expand All @@ -80,7 +80,7 @@ popFilterDrum(freq,q,gate) = en.ar(0.001,0.001,gate)*no.noise : fi.resonbp(freq,
//
// Where:
//
// * `freq`: frequency of the sawtooth
// * `freq`: frequency of the sawtooth in Hz
// * `ctFreq`: cutoff frequency of the filter
// * `q`: Q of the filter
// * `gate`: the trigger signal (0 or 1)
Expand All @@ -101,13 +101,12 @@ with {
// #### Usage
//
// ```
// sawTrombone(att,freq,gain,gate) : _
// sawTrombone(freq,gain,gate) : _
// ```
//
// Where:
//
// * `att`: exponential attack duration in s (typically 0.01)
// * `freq`: the frequency
// * `freq`: the frequency in Hz
// * `gain`: the gain (0-1)
// * `gate`: the gate (0 or 1)
//----------------------------------------------------------------------------------------
Expand All @@ -133,7 +132,7 @@ with {
//
// Where:
//
// * `freq`: the frequency of the string
// * `freq`: the frequency of the string in Hz
// * `res`: string T60 (resonance time) in second
// * `gate`: trigger signal (0 or 1)
//----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -161,7 +160,7 @@ with {
//
// Where:
//
// * `freq`: the resonance frequency of the drum
// * `freq`: the resonance frequency of the drum in Hz
// * `freqRatio`: a list of ratio to choose the frequency of the mode in
// function of `freq` e.g.(1 1.2 1.5 ...). The first element should always
// be one (fundamental).
Expand All @@ -175,12 +174,12 @@ with {
//----------------------------------------------------------------------------------------
declare additiveDrum author "Romain Michon";

additiveDrum(freq,freqRatio,gain,modeDec,att,rel,gate) = par(i,N,os.osc(modeFreq(i))*gainEnvelope(i)) :> _
additiveDrum(freq,freqRatio,gain,harmDec,att,rel,gate) = par(i,N,os.osc(modeFreq(i))*gainEnvelope(i)) :> _
with {
N = ba.count(freqRatio);
modeFreq(i) = freq*ba.take(i+1,freqRatio);
modeGain(i) = ba.take(i+1,gain);
gainEnvelope(i) = modeGain(i)*en.ar(att,rel*(1-(modeDec*(i/N))),gate);
gainEnvelope(i) = modeGain(i)*en.ar(att,rel*(1-(harmDec*(i/N))),gate);
};


Expand Down

0 comments on commit 86cbea3

Please sign in to comment.