aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudvig Gunne Lindström <ludviggunnelindstrom@gmail.com>2026-07-17 11:43:24 +0200
committerLudvig Gunne Lindström <ludviggunnelindstrom@gmail.com>2026-11-08 14:15:04 +0100
commit039847a29868d335c08fe0a587260dffc71ca5c4 (patch)
treee9d775090fef45ca51db576779fb373040d50e6a /doc
downloadmelisma-modules-main.tar.gz
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/buffer.html247
-rw-r--r--doc/classes/delay.html270
-rw-r--r--doc/classes/gain.html179
-rw-r--r--doc/classes/interp.html322
-rw-r--r--doc/classes/ladspa.html298
-rw-r--r--doc/classes/mixer.html139
-rw-r--r--doc/classes/nullsink.html188
-rw-r--r--doc/classes/oscil.html392
-rw-r--r--doc/classes/pan.html240
-rw-r--r--doc/classes/playback.html331
-rw-r--r--doc/classes/sample.html203
-rw-r--r--doc/classes/serial.html161
-rw-r--r--doc/classes/timer.html226
-rw-r--r--doc/index.html153
-rw-r--r--doc/ldoc_fixed.css312
-rw-r--r--doc/modules/biquad.html189
-rw-r--r--doc/modules/expression.html221
-rw-r--r--doc/modules/fs.html138
-rw-r--r--doc/modules/keycallback.html133
-rw-r--r--doc/modules/udp.html311
20 files changed, 4653 insertions, 0 deletions
diff --git a/doc/classes/buffer.html b/doc/classes/buffer.html
new file mode 100644
index 0000000..0811641
--- /dev/null
+++ b/doc/classes/buffer.html
@@ -0,0 +1,247 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><strong>buffer</strong></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>buffer</code></h1>
+<p>Audio buffer for capture/playback.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> mbuffer = <span class="global">require</span> <span class="string">'melisma.buffer'</span>
+<span class="keyword">local</span> mevent = <span class="global">require</span> <span class="string">'melisma.event'</span>
+
+<span class="keyword">local</span> input = ...
+
+<span class="comment">-- Create a buffer with capacity of 5 seconds
+</span><span class="comment">-- Capture stops automatically when buffer is full.
+</span><span class="keyword">local</span> len = <span class="number">5</span>
+<span class="keyword">local</span> buffer = mbuffer.<span class="function-name">init</span>(input, len)
+
+<span class="comment">-- Capture audio
+</span>buffer:<span class="function-name">capture</span>()
+
+<span class="comment">-- Playback after capture 3 seconds
+</span>mevent.<span class="function-name">schedule</span>(<span class="number">3</span>, buffer.playback, buffer)
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#buffer.init">buffer.init(input, len)</a></td>
+ <td class="summary">Create an audio buffer.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#buffer:capture">buffer:capture()</a></td>
+ <td class="summary">Start capture mode.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#buffer:length">buffer:length()</a></td>
+ <td class="summary">Get length of captured audio.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#buffer:playback">buffer:playback()</a></td>
+ <td class="summary">Start playback mode.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#buffer:speed">buffer:speed(speed)</a></td>
+ <td class="summary">Set playback speed.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "buffer.init"></a>
+ <strong>buffer.init(input, len)</strong>
+ </dt>
+ <dd>
+ Create an audio buffer.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">input</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signal.
+ </li>
+ <li><span class="parameter">len</span>
+ <span class="types"><span class="type">number</span></span>
+ Buffer capacity in seconds.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/buffer.html#">buffer</a></span>
+ The newly created audio buffer.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "buffer:capture"></a>
+ <strong>buffer:capture()</strong>
+ </dt>
+ <dd>
+ Start capture mode.
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "buffer:length"></a>
+ <strong>buffer:length()</strong>
+ </dt>
+ <dd>
+ Get length of captured audio.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">number</span></span>
+ Length of captured audio in seconds.
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "buffer:playback"></a>
+ <strong>buffer:playback()</strong>
+ </dt>
+ <dd>
+ Start playback mode.
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "buffer:speed"></a>
+ <strong>buffer:speed(speed)</strong>
+ </dt>
+ <dd>
+ Set playback speed.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">speed</span>
+ <span class="types"><span class="type">number</span></span>
+ Playback speed.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/delay.html b/doc/classes/delay.html
new file mode 100644
index 0000000..3a5470d
--- /dev/null
+++ b/doc/classes/delay.html
@@ -0,0 +1,270 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><strong>delay</strong></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>delay</code></h1>
+<p>Digital delay line.</p>
+<p>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#delay.init">delay.init(input)</a></td>
+ <td class="summary">Create a delay line.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#delay:delay">delay:delay(d)</a></td>
+ <td class="summary">Set delay.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#delay:feedback">delay:feedback(f)</a></td>
+ <td class="summary">Set feedback.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#delay:gain">delay:gain(g)</a></td>
+ <td class="summary">Set gain.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#delay:wetdrymix">delay:wetdrymix(wd)</a></td>
+ <td class="summary">Set wet/dry mix.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "delay.init"></a>
+ <strong>delay.init(input)</strong>
+ </dt>
+ <dd>
+ Create a delay line.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">input</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signal.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/delay.html#">delay</a></span>
+ Newly created delay line.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "delay:delay"></a>
+ <strong>delay:delay(d)</strong>
+ </dt>
+ <dd>
+ Set delay.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">d</span>
+ <span class="types"><span class="type">number</span></span>
+ delay in seconds.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/delay.html#">delay</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "delay:feedback"></a>
+ <strong>delay:feedback(f)</strong>
+ </dt>
+ <dd>
+ Set feedback.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">f</span>
+ <span class="types"><span class="type">number</span></span>
+ Feedback.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/delay.html#">delay</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "delay:gain"></a>
+ <strong>delay:gain(g)</strong>
+ </dt>
+ <dd>
+ Set gain.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">g</span>
+ <span class="types"><span class="type">number</span></span>
+ Gain (<strong>TODO</strong>: Use decibels).
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/delay.html#">delay</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "delay:wetdrymix"></a>
+ <strong>delay:wetdrymix(wd)</strong>
+ </dt>
+ <dd>
+ Set wet/dry mix.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">wd</span>
+ <span class="types"><span class="type">number</span></span>
+ Wet/dry mix.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/delay.html#">delay</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/gain.html b/doc/classes/gain.html
new file mode 100644
index 0000000..46bea50
--- /dev/null
+++ b/doc/classes/gain.html
@@ -0,0 +1,179 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><strong>gain</strong></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>gain</code></h1>
+<p>Apply gain to signals.</p>
+<p>
+
+
+<pre>
+<span class="keyword">local</span> mgain = <span class="global">require</span> <span class="string">'melisma.gain'</span>
+
+<span class="comment">-- Interprets <code>cntl</code> as decibels and applies it to <code>input</code>
+</span><span class="keyword">local</span> input = ...
+<span class="keyword">local</span> cntl = ...
+<span class="keyword">local</span> gain = mgain.<span class="function-name">db</span>(input,cntl)
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#gain.db">gain.db(input, gain)</a></td>
+ <td class="summary">Creates a decibel gain unit.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#gain.linear">gain.linear(input, gain)</a></td>
+ <td class="summary">Creates a linear gain unit.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "gain.db"></a>
+ <strong>gain.db(input, gain)</strong>
+ </dt>
+ <dd>
+ Creates a decibel gain unit.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">input</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signal.
+ </li>
+ <li><span class="parameter">gain</span>
+ <span class="types"><span class="type">number</span> or <span class="type">channel</span></span>
+ Constant gain in decibels or a controlling signal.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/gain.html#">gain</a></span>
+ The newly created gain unit.
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "gain.linear"></a>
+ <strong>gain.linear(input, gain)</strong>
+ </dt>
+ <dd>
+ Creates a linear gain unit.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">input</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signal.
+ </li>
+ <li><span class="parameter">gain</span>
+ <span class="types"><span class="type">number</span> or <span class="type">channel</span></span>
+ Constant gain or a controlling signal.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/gain.html#">gain</a></span>
+ The newly created gain unit.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/interp.html b/doc/classes/interp.html
new file mode 100644
index 0000000..cea6277
--- /dev/null
+++ b/doc/classes/interp.html
@@ -0,0 +1,322 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><strong>interp</strong></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>interp</code></h1>
+<p>Interpolation.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> minterp = <span class="global">require</span> <span class="string">'melisma.interp'</span>
+<span class="keyword">local</span> mevent = <span class="global">require</span> <span class="string">'melisma.event'</span>
+<span class="keyword">local</span> mgain = <span class="global">require</span> <span class="string">'melisma.gain'</span>
+
+<span class="keyword">local</span> interp = minterp.<span class="function-name">init</span>(<span class="number">0</span>)
+
+interp:<span class="function-name">linear</span>(<span class="number">1</span>,<span class="number">1</span>)
+
+mevent.<span class="function-name">schedule</span>(<span class="number">0.5</span>, <span class="keyword">function</span>()
+ <span class="global">print</span>(<span class="string">'current value:'</span>, interp:<span class="function-name">sample</span>())
+<span class="keyword">end</span>)
+
+<span class="keyword">local</span> sig = ...
+<span class="keyword">local</span> gain = mgain.<span class="function-name">linear</span>(sig,interp)
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#interp.init">interp.init(x0)</a></td>
+ <td class="summary">Initialize an interpolation unit.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#interp:ease_in">interp:ease_in(v, t)</a></td>
+ <td class="summary">Interpolate using ease-in interpolation.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#interp:ease_out">interp:ease_out(v, t)</a></td>
+ <td class="summary">Interpolate using ease-out interpolation.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#interp:linear">interp:linear(v, t)</a></td>
+ <td class="summary">Interpolate using linear interpolation.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#interp:sample">interp:sample()</a></td>
+ <td class="summary">Get the current value.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#interp:set">interp:set(x)</a></td>
+ <td class="summary">Set value directly.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#interp:smoothstep">interp:smoothstep(v, t)</a></td>
+ <td class="summary">Interpolate using smoothstep interpolation.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "interp.init"></a>
+ <strong>interp.init(x0)</strong>
+ </dt>
+ <dd>
+ Initialize an interpolation unit.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">x0</span>
+ <span class="types"><span class="type">number</span></span>
+ Initial value.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/interp.html#">interp</a></span>
+ The newly created interpolation unit.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "interp:ease_in"></a>
+ <strong>interp:ease_in(v, t)</strong>
+ </dt>
+ <dd>
+ Interpolate using ease-in interpolation.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">v</span>
+ <span class="types"><span class="type">number</span></span>
+ Target value.
+ </li>
+ <li><span class="parameter">t</span>
+ <span class="types"><span class="type">number</span></span>
+ Interpolation time.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "interp:ease_out"></a>
+ <strong>interp:ease_out(v, t)</strong>
+ </dt>
+ <dd>
+ Interpolate using ease-out interpolation.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">v</span>
+ <span class="types"><span class="type">number</span></span>
+ Target value.
+ </li>
+ <li><span class="parameter">t</span>
+ <span class="types"><span class="type">number</span></span>
+ Interpolation time.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "interp:linear"></a>
+ <strong>interp:linear(v, t)</strong>
+ </dt>
+ <dd>
+ Interpolate using linear interpolation.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">v</span>
+ <span class="types"><span class="type">number</span></span>
+ Target value.
+ </li>
+ <li><span class="parameter">t</span>
+ <span class="types"><span class="type">number</span></span>
+ Interpolation time.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "interp:sample"></a>
+ <strong>interp:sample()</strong>
+ </dt>
+ <dd>
+ Get the current value.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">number</span></span>
+ The current value.
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "interp:set"></a>
+ <strong>interp:set(x)</strong>
+ </dt>
+ <dd>
+ Set value directly.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">x</span>
+ <span class="types"><span class="type">number</span></span>
+ New value.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "interp:smoothstep"></a>
+ <strong>interp:smoothstep(v, t)</strong>
+ </dt>
+ <dd>
+ Interpolate using smoothstep interpolation.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">v</span>
+ <span class="types"><span class="type">number</span></span>
+ Target value.
+ </li>
+ <li><span class="parameter">t</span>
+ <span class="types"><span class="type">number</span></span>
+ Interpolation time.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/ladspa.html b/doc/classes/ladspa.html
new file mode 100644
index 0000000..846b65b
--- /dev/null
+++ b/doc/classes/ladspa.html
@@ -0,0 +1,298 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><strong>ladspa</strong></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>ladspa</code></h1>
+<p>LADSPA plugin support.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> mladspa = <span class="global">require</span> <span class="string">'melisma.ladspa'</span>
+
+<span class="keyword">local</span> spec = <span class="string">'caps.so:Plate'</span>
+<span class="keyword">local</span> info = mladspa.<span class="function-name">info</span>(spec)
+
+<span class="global">print</span>(<span class="string">'name:'</span>,info.name)
+<span class="global">print</span>(<span class="string">'maker:'</span>,info.maker)
+
+<span class="keyword">local</span> input = ...
+<span class="keyword">local</span> plate = mladspa.<span class="global">load</span>(spec,input)
+
+plate:<span class="function-name">control</span>(<span class="number">1</span>,<span class="number">1</span>)
+
+<span class="keyword">local</span> left = plate:<span class="function-name">out</span>(<span class="number">6</span>)
+<span class="keyword">local</span> right = plate:<span class="function-name">out</span>(<span class="number">7</span>)
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#ladspa.info">ladspa.info(spec)</a></td>
+ <td class="summary">Get information about a specific plugin.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#ladspa.lib_info">ladspa.lib_info(path)</a></td>
+ <td class="summary">List plugins in the specified plugin library.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#ladspa.load">ladspa.load(spec, ...)</a></td>
+ <td class="summary">Load a ladspa plugin.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#ladspa:control">ladspa:control(i, v)</a></td>
+ <td class="summary">Set the value of an input control port.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#ladspa:out">ladspa:out(i)</a></td>
+ <td class="summary">Get the audio output port at the specified index.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "ladspa.info"></a>
+ <strong>ladspa.info(spec)</strong>
+ </dt>
+ <dd>
+ Get information about a specific plugin. </p>
+
+<p>Plugin specifications are written in the format <code>&lt;path&gt;:&lt;plugin&gt;</code>,
+where <code>&lt;path&gt;</code> is the full name of the plugin library
+(e.g. <code>caps.so</code>), and <code>&lt;plugin&gt;</code> is the name or label of the plugin.
+If <code>&lt;path&gt;</code> is not an absolute path, the library is searched for
+first in the current directory, then in <code>LADSPA_PATH</code>.</p>
+
+<p>This can be used to generate more ergonomic plugin interfaces.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">spec</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+ Plugin specification.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
+ Plugin information.
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "ladspa.lib_info"></a>
+ <strong>ladspa.lib_info(path)</strong>
+ </dt>
+ <dd>
+ List plugins in the specified plugin library. </p>
+
+<p>If <code>path</code> is not an absolute path, the library is searched for
+first in the current directory, then in <code>LADSPA_PATH</code>.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">path</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+ Path to plugin library.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
+ List of short plugin descriptions.
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "ladspa.load"></a>
+ <strong>ladspa.load(spec, ...)</strong>
+ </dt>
+ <dd>
+ Load a ladspa plugin. </p>
+
+<p>Input signals are connected to the plugins audio input ports in the
+order that they are declared.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">spec</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+ Plugin specification.
+ </li>
+ <li><span class="parameter">...</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signals.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "ladspa:control"></a>
+ <strong>ladspa:control(i, v)</strong>
+ </dt>
+ <dd>
+ Set the value of an input control port. </p>
+
+<p>Ports are indexed based on the order they are declared by the plugin.
+This also means the indices of control ports are not necessarily consecutive.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">i</span>
+ <span class="types"><span class="type">integer</span></span>
+ One-based port index.
+ </li>
+ <li><span class="parameter">v</span>
+ <span class="types"><span class="type">number</span></span>
+ New control port value.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "ladspa:out"></a>
+ <strong>ladspa:out(i)</strong>
+ </dt>
+ <dd>
+ Get the audio output port at the specified index. </p>
+
+<p>Ports are indexed based on the order they are declared by the plugin.
+This also means the indices of audio ports are not necessarily consecutive.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">i</span>
+ <span class="types"><span class="type">integer</span></span>
+ One-based port index.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">channel</span></span>
+ Audio output at specified index.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/mixer.html b/doc/classes/mixer.html
new file mode 100644
index 0000000..2f8625c
--- /dev/null
+++ b/doc/classes/mixer.html
@@ -0,0 +1,139 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><strong>mixer</strong></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>mixer</code></h1>
+<p>Mix signals.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> mmixer = <span class="global">require</span> <span class="string">'melisma.mixer'</span>
+
+<span class="keyword">local</span> signals = ...
+<span class="keyword">local</span> mixer = mmixer.<span class="function-name">init</span>(<span class="global">table</span>.<span class="function-name">unpack</span>(signals))
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#mixer.init">mixer.init(...)</a></td>
+ <td class="summary">Mix input signals in to a single output signal.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "mixer.init"></a>
+ <strong>mixer.init(...)</strong>
+ </dt>
+ <dd>
+ Mix input signals in to a single output signal.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">...</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signals.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/mixer.html#">mixer</a></span>
+ The newly created mixer unit.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/nullsink.html b/doc/classes/nullsink.html
new file mode 100644
index 0000000..d8a611b
--- /dev/null
+++ b/doc/classes/nullsink.html
@@ -0,0 +1,188 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><strong>nullsink</strong></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>nullsink</code></h1>
+<p>Reference otherwise disconnected nodes.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> mnullsink = <span class="global">require</span> <span class="string">'melisma.nullsink'</span>
+<span class="keyword">local</span> minterp = <span class="global">require</span> <span class="string">'melisma.interp'</span>
+<span class="keyword">local</span> mevent = <span class="global">require</span> <span class="string">'melisma.event'</span>
+
+<span class="keyword">local</span> interp = minterp.<span class="function-name">init</span>(<span class="number">0</span>)
+interp:<span class="function-name">linear</span>(<span class="number">1</span>,<span class="number">60</span>)
+
+<span class="comment">-- The output of interp is disconnected.
+</span><span class="comment">-- Need to connect it to a nullsink so we
+</span><span class="comment">-- can sample it in the event callback below.
+</span><span class="keyword">local</span> nullsink = mnullsink.<span class="function-name">init</span>()
+nullsink:<span class="function-name">ref</span>(interp)
+
+mevent.<span class="function-name">schedule</span>(<span class="number">30</span>, <span class="keyword">function</span>()
+ <span class="global">print</span>(<span class="string">'current value:'</span>, interp:<span class="function-name">sample</span>())
+<span class="keyword">end</span>)
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#nullsink.init">nullsink.init()</a></td>
+ <td class="summary">Create a nullsink.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#nullsink:ref">nullsink:ref(input)</a></td>
+ <td class="summary">Connect an input signal.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "nullsink.init"></a>
+ <strong>nullsink.init()</strong>
+ </dt>
+ <dd>
+ Create a nullsink.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/nullsink.html#">nullsink</a></span>
+ The newly created nullsink.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "nullsink:ref"></a>
+ <strong>nullsink:ref(input)</strong>
+ </dt>
+ <dd>
+ Connect an input signal. </p>
+
+<p>This makes sure the input signal is processed
+even if it's not connected to anything else.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">input</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signal.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/nullsink.html#">nullsink</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/oscil.html b/doc/classes/oscil.html
new file mode 100644
index 0000000..5aea703
--- /dev/null
+++ b/doc/classes/oscil.html
@@ -0,0 +1,392 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+<li><a href="#Class_wavetable">Class wavetable </a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><strong>oscil</strong></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>oscil</code></h1>
+<p>Wavetable backed oscillators.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> moscil = <span class="global">require</span> <span class="string">'melisma.oscil'</span>
+<span class="keyword">local</span> mexpression = <span class="global">require</span> <span class="string">'melisma.expression'</span>
+
+<span class="keyword">local</span> wt = moscil.wavetable.<span class="function-name">sin</span>()
+
+<span class="comment">-- Make an LFO for controlling the frequency.
+</span><span class="keyword">local</span> lfo_oscil = moscil.<span class="function-name">init</span>(wt,<span class="number">1</span>,<span class="number">1</span>)
+
+<span class="comment">-- Map [-1, 1] to [440, 880]
+</span><span class="keyword">local</span> lfo = (<span class="number">440</span> + (<span class="number">1</span> + mexpression.<span class="function-name">input</span>(lfo_oscil,<span class="number">0</span>) / <span class="number">2</span>) * <span class="number">440</span>):<span class="function-name">build</span>()
+
+<span class="keyword">local</span> oscil = moscil.<span class="function-name">init</span>(wt,<span class="number">0</span>,<span class="number">0.5</span>)
+oscil:<span class="function-name">mapf</span>(lfo)
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#oscil.init">oscil.init(wt, freq, amp)</a></td>
+ <td class="summary">Initialize an oscillator.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#oscil:mapa">oscil:mapa(sig)</a></td>
+ <td class="summary">Map a signal to the amplitude.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#oscil:mapf">oscil:mapf(sig)</a></td>
+ <td class="summary">Map a signal to the frequency.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#oscil:sample">oscil:sample()</a></td>
+ <td class="summary">Get the current oscillator value.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#oscil:seta">oscil:seta(amp)</a></td>
+ <td class="summary">Set oscillator amplitude.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#oscil:setf">oscil:setf(freq)</a></td>
+ <td class="summary">Set oscillator frequency.</td>
+ </tr>
+</table>
+<h2><a href="#Class_wavetable">Class wavetable </a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#wavetable.saw">wavetable.saw()</a></td>
+ <td class="summary">Saw wave.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#wavetable.sin">wavetable.sin()</a></td>
+ <td class="summary">Sine wave.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#wavetable.square">wavetable.square()</a></td>
+ <td class="summary">Square wave.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "oscil.init"></a>
+ <strong>oscil.init(wt, freq, amp)</strong>
+ </dt>
+ <dd>
+ Initialize an oscillator.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">wt</span>
+ <span class="types"><a class="type" href="../classes/oscil.html#wavetable">wavetable</a></span>
+
+
+
+ </li>
+ <li><span class="parameter">freq</span>
+ <span class="types"><span class="type">number</span></span>
+
+
+
+ </li>
+ <li><span class="parameter">amp</span>
+ <span class="types"><span class="type">number</span></span>
+
+
+
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/oscil.html#">oscil</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "oscil:mapa"></a>
+ <strong>oscil:mapa(sig)</strong>
+ </dt>
+ <dd>
+ Map a signal to the amplitude.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">sig</span>
+ <span class="types"><span class="type">channel</span></span>
+
+
+
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "oscil:mapf"></a>
+ <strong>oscil:mapf(sig)</strong>
+ </dt>
+ <dd>
+ Map a signal to the frequency.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">sig</span>
+ <span class="types"><span class="type">channel</span></span>
+
+
+
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "oscil:sample"></a>
+ <strong>oscil:sample()</strong>
+ </dt>
+ <dd>
+ Get the current oscillator value.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">number</span></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "oscil:seta"></a>
+ <strong>oscil:seta(amp)</strong>
+ </dt>
+ <dd>
+ Set oscillator amplitude.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">amp</span>
+ <span class="types"><span class="type">number</span></span>
+
+
+
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "oscil:setf"></a>
+ <strong>oscil:setf(freq)</strong>
+ </dt>
+ <dd>
+ Set oscillator frequency.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">freq</span>
+ <span class="types"><span class="type">number</span></span>
+
+
+
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Class_wavetable"></a>Class wavetable </h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "wavetable.saw"></a>
+ <strong>wavetable.saw()</strong>
+ </dt>
+ <dd>
+ Saw wave.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/oscil.html#wavetable">wavetable</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "wavetable.sin"></a>
+ <strong>wavetable.sin()</strong>
+ </dt>
+ <dd>
+ Sine wave.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/oscil.html#wavetable">wavetable</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "wavetable.square"></a>
+ <strong>wavetable.square()</strong>
+ </dt>
+ <dd>
+ Square wave.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/oscil.html#wavetable">wavetable</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/pan.html b/doc/classes/pan.html
new file mode 100644
index 0000000..1728b7c
--- /dev/null
+++ b/doc/classes/pan.html
@@ -0,0 +1,240 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><strong>pan</strong></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>pan</code></h1>
+<p>Panning</p>
+<p>
+
+<pre>
+<span class="keyword">local</span> mpan = <span class="global">require</span> <span class="string">'melisma.pan'</span>
+<span class="keyword">local</span> mexpression = <span class="global">require</span> <span class="string">'melisma.expression'</span>
+<span class="keyword">local</span> moscil = <span class="global">require</span> <span class="string">'melisma.oscil'</span>
+
+<span class="keyword">local</span> wt = moscil.wavetable.<span class="function-name">sin</span>()
+<span class="keyword">local</span> lfo_oscil = moscil.<span class="function-name">init</span>(wt,<span class="number">1</span>,<span class="number">1</span>)
+<span class="keyword">local</span> lfo = (<span class="number">1</span> + mexpression.<span class="function-name">input</span>(lfo_oscil,<span class="number">0</span>) / <span class="number">2</span>):<span class="function-name">build</span>()
+
+<span class="keyword">local</span> oscil = moscil.<span class="function-name">init</span>(wt,<span class="number">440</span>,<span class="number">0.5</span>)
+<span class="keyword">local</span> pan = mpan.<span class="function-name">init</span>(lfo,oscil)
+
+<span class="keyword">local</span> left = pan:<span class="function-name">left</span>()
+<span class="keyword">local</span> right = pan:<span class="function-name">right</span>()
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#pan.init">pan.init(x, sig)</a></td>
+ <td class="summary">Initialize a panning unit.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#pan:left">pan:left()</a></td>
+ <td class="summary">Get the left output signal.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#pan:right">pan:right()</a></td>
+ <td class="summary">Get the right output signal.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#pan:set">pan:set(x)</a></td>
+ <td class="summary">Set the panning value.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "pan.init"></a>
+ <strong>pan.init(x, sig)</strong>
+ </dt>
+ <dd>
+ Initialize a panning unit. </p>
+
+<p>A panning value ranges from 0 to 1, where a value of 0
+will pan everything to the left.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">x</span>
+ <span class="types"><span class="type">number</span> or <span class="type">channel</span></span>
+ Constant pan or a controlling signal.
+ </li>
+ <li><span class="parameter">sig</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signal.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/pan.html#">pan</a></span>
+ The newly created panning unit.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "pan:left"></a>
+ <strong>pan:left()</strong>
+ </dt>
+ <dd>
+ Get the left output signal.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">channel</span></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "pan:right"></a>
+ <strong>pan:right()</strong>
+ </dt>
+ <dd>
+ Get the right output signal.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">channel</span></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "pan:set"></a>
+ <strong>pan:set(x)</strong>
+ </dt>
+ <dd>
+ Set the panning value.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">x</span>
+ <span class="types"><span class="type">number</span></span>
+
+
+
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/playback.html b/doc/classes/playback.html
new file mode 100644
index 0000000..fcee0d6
--- /dev/null
+++ b/doc/classes/playback.html
@@ -0,0 +1,331 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><strong>playback</strong></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>playback</code></h1>
+<p>Audio sample playback.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> msample = <span class="global">require</span> <span class="string">'melisma.sample'</span>
+<span class="keyword">local</span> mplayback = <span class="global">require</span> <span class="string">'melisma.playback'</span>
+
+<span class="keyword">local</span> sample = msample.<span class="global">load</span>(<span class="string">'sample.wav'</span>)
+<span class="keyword">local</span> playb = mplayback.<span class="function-name">init</span>(sample)
+
+playb:<span class="function-name">loop</span>(<span class="keyword">true</span>)
+playb:<span class="function-name">spped</span>(<span class="number">2</span>)
+playb:<span class="function-name">play</span>()
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#playback.init">playback.init(smp)</a></td>
+ <td class="summary">Intialize a playback unit.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#playback:loop">playback:loop(b)</a></td>
+ <td class="summary">Enable/disable automatic looping.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#playback:pause">playback:pause()</a></td>
+ <td class="summary">Pause playback.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#playback:phase">playback:phase(x)</a></td>
+ <td class="summary">Set playback phase.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#playback:play">playback:play()</a></td>
+ <td class="summary">Start playback.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#playback:reset">playback:reset()</a></td>
+ <td class="summary">Reset playback.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#playback:reset">playback:reset()</a></td>
+ <td class="summary">Set playback speed.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#playback:set_sample">playback:set_sample(smp)</a></td>
+ <td class="summary">Set playback sample.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#playback:stop">playback:stop()</a></td>
+ <td class="summary">Stop playback.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "playback.init"></a>
+ <strong>playback.init(smp)</strong>
+ </dt>
+ <dd>
+ Intialize a playback unit.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">smp</span>
+ <span class="types"><a class="type" href="../classes/sample.html#">sample</a> or <span class="type">nil</span></span>
+
+
+
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/playback.html#">playback</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "playback:loop"></a>
+ <strong>playback:loop(b)</strong>
+ </dt>
+ <dd>
+ Enable/disable automatic looping.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">b</span>
+ <span class="types"><span class="type">bool</span></span>
+
+
+
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "playback:pause"></a>
+ <strong>playback:pause()</strong>
+ </dt>
+ <dd>
+ Pause playback.
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "playback:phase"></a>
+ <strong>playback:phase(x)</strong>
+ </dt>
+ <dd>
+ Set playback phase.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">x</span>
+ <span class="types"><span class="type">number</span></span>
+ Phase ranging from 0 to 1.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "playback:play"></a>
+ <strong>playback:play()</strong>
+ </dt>
+ <dd>
+ Start playback.
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "playback:reset"></a>
+ <strong>playback:reset()</strong>
+ </dt>
+ <dd>
+ Reset playback. </p>
+
+<p>Equivalent to <a href="../classes/playback.html#playback:phase">playback.phase</a>(0).
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "playback:reset"></a>
+ <strong>playback:reset()</strong>
+ </dt>
+ <dd>
+ Set playback speed. </p>
+
+<p>A negative speed will play the sample in reverse.
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "playback:set_sample"></a>
+ <strong>playback:set_sample(smp)</strong>
+ </dt>
+ <dd>
+ Set playback sample.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">smp</span>
+ <span class="types"><a class="type" href="../classes/sample.html#">sample</a></span>
+
+
+
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "playback:stop"></a>
+ <strong>playback:stop()</strong>
+ </dt>
+ <dd>
+ Stop playback. </p>
+
+<p>Equivalent to <a href="../classes/playback.html#playback:pause">playback.pause</a>; <a href="../classes/playback.html#playback:reset">playback.reset</a>.
+
+
+
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/sample.html b/doc/classes/sample.html
new file mode 100644
index 0000000..313d14d
--- /dev/null
+++ b/doc/classes/sample.html
@@ -0,0 +1,203 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><strong>sample</strong></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>sample</code></h1>
+<p>Load audio samples.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> msample = <span class="global">require</span> <span class="string">'melisma.sample'</span>
+
+<span class="keyword">local</span> smp = msample.<span class="global">load</span>(<span class="string">'sample.wav'</span>)
+
+<span class="global">print</span>(smp:<span class="function-name">length</span>())
+<span class="global">print</span>(smp:<span class="function-name">path</span>())
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#sample.load">sample.load(path)</a></td>
+ <td class="summary">Load an audio sample.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#sample:length">sample:length()</a></td>
+ <td class="summary">Get sample length.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#sample:path">sample:path()</a></td>
+ <td class="summary">Get sample path.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "sample.load"></a>
+ <strong>sample.load(path)</strong>
+ </dt>
+ <dd>
+ Load an audio sample. </p>
+
+<p>If necessary, the audio will be resampled to the current sample rate.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">path</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+
+
+
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/sample.html#">sample</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "sample:length"></a>
+ <strong>sample:length()</strong>
+ </dt>
+ <dd>
+ Get sample length.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">number</span></span>
+ The length of the sample in seconds.
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "sample:path"></a>
+ <strong>sample:path()</strong>
+ </dt>
+ <dd>
+ Get sample path.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+ The path that the sample was loaded from.
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/serial.html b/doc/classes/serial.html
new file mode 100644
index 0000000..ca72d57
--- /dev/null
+++ b/doc/classes/serial.html
@@ -0,0 +1,161 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><strong>serial</strong></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>serial</code></h1>
+<p>Read data on serial ports.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> mserial = <span class="global">require</span> <span class="string">'melisma.serial'</span>
+
+mserial.<span class="function-name">open</span> {
+ path = <span class="string">'/dev/ttyACM0'</span>,
+ callback = <span class="global">print</span>,
+}
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#serial.open">serial.open(conf)</a></td>
+ <td class="summary">Open a serial port.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "serial.open"></a>
+ <strong>serial.open(conf)</strong>
+ </dt>
+ <dd>
+
+<p>Open a serial port. </p>
+
+<p><code>conf</code> is a table containing the following keys:</p>
+
+<ul>
+ <li><code>path</code> (<strong>string, required</strong>): Path to serial port (e.g. <code>/dev/ttyACM0</code>).</li>
+ <li><code>callback</code> (<strong>function, required</strong>): Callback function for handling messages.</li>
+ <li><code>baud</code> (<strong>integer</strong>); baud rate (default <code>9600</code>).</li>
+ <li><code>format</code> (<strong>string</strong>): frame format (default <code>&apos;8N1&apos;</code>).</li>
+ <li><code>encoding</code> (<strong>string</strong>): method for encoding messages (default <code>&apos;cstring&apos;</code>). May be one of:
+ <ul>
+ <li><code>&apos;cstring&apos;</code>: <code>NULL</code>-terminated strings.</li>
+ </ul></li>
+</ul>
+
+
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">conf</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
+
+
+
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/serial.html#">serial</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/classes/timer.html b/doc/classes/timer.html
new file mode 100644
index 0000000..a6b16c8
--- /dev/null
+++ b/doc/classes/timer.html
@@ -0,0 +1,226 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Methods">Methods</a></li>
+</ul>
+
+
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><strong>timer</strong></li>
+</ul>
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Class <code>timer</code></h1>
+<p>Time measurement.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> mtimer = <span class="global">require</span> <span class="string">'melisma.timer'</span>
+<span class="keyword">local</span> mkeycallback = <span class="global">require</span> <span class="string">'melisma.keycallback'</span>
+
+<span class="keyword">local</span> timer = mtimer.<span class="function-name">init</span>()
+timer:<span class="function-name">start</span>()
+
+mkeycallback.<span class="function-name">set</span>(<span class="keyword">function</span>()
+ <span class="global">print</span>(timer:<span class="function-name">read</span>())
+ timer:<span class="function-name">reset</span>()
+<span class="keyword">end</span>)
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#timer.init">timer.init()</a></td>
+ <td class="summary">Create a new timer.</td>
+ </tr>
+</table>
+<h2><a href="#Methods">Methods</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#timer:read">timer:read()</a></td>
+ <td class="summary">Read timer.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#timer:reset">timer:reset()</a></td>
+ <td class="summary">Reset timer.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#timer:start">timer:start()</a></td>
+ <td class="summary">Start timer.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#timer:stop">timer:stop()</a></td>
+ <td class="summary">Stop timer.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "timer.init"></a>
+ <strong>timer.init()</strong>
+ </dt>
+ <dd>
+ Create a new timer.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../classes/timer.html#">timer</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header "><a name="Methods"></a>Methods</h2>
+
+ <dl class="function">
+ <dt>
+ <a name = "timer:read"></a>
+ <strong>timer:read()</strong>
+ </dt>
+ <dd>
+ Read timer.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">number</span></span>
+ Elapsed seconds.
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "timer:reset"></a>
+ <strong>timer:reset()</strong>
+ </dt>
+ <dd>
+ Reset timer.
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "timer:start"></a>
+ <strong>timer:start()</strong>
+ </dt>
+ <dd>
+ Start timer.
+
+
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "timer:stop"></a>
+ <strong>timer:stop()</strong>
+ </dt>
+ <dd>
+ Stop timer.
+
+
+
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/index.html b/doc/index.html
new file mode 100644
index 0000000..f7d3c3e
--- /dev/null
+++ b/doc/index.html
@@ -0,0 +1,153 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+
+
+
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="modules/biquad.html">biquad</a></li>
+ <li><a href="modules/expression.html">expression</a></li>
+ <li><a href="modules/fs.html">fs</a></li>
+ <li><a href="modules/keycallback.html">keycallback</a></li>
+ <li><a href="modules/udp.html">udp</a></li>
+</ul>
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="classes/buffer.html">buffer</a></li>
+ <li><a href="classes/delay.html">delay</a></li>
+ <li><a href="classes/gain.html">gain</a></li>
+ <li><a href="classes/interp.html">interp</a></li>
+ <li><a href="classes/ladspa.html">ladspa</a></li>
+ <li><a href="classes/mixer.html">mixer</a></li>
+ <li><a href="classes/nullsink.html">nullsink</a></li>
+ <li><a href="classes/oscil.html">oscil</a></li>
+ <li><a href="classes/pan.html">pan</a></li>
+ <li><a href="classes/playback.html">playback</a></li>
+ <li><a href="classes/sample.html">sample</a></li>
+ <li><a href="classes/serial.html">serial</a></li>
+ <li><a href="classes/timer.html">timer</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+
+ <h2>Melisma module reference</h2>
+
+<h2>Modules</h2>
+<table class="module_list">
+ <tr>
+ <td class="name" nowrap><a href="modules/biquad.html">biquad</a></td>
+ <td class="summary">Digital biquad filters.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="modules/expression.html">expression</a></td>
+ <td class="summary">Build filters with arithmetic expressions.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="modules/fs.html">fs</a></td>
+ <td class="summary">File system utilities.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="modules/keycallback.html">keycallback</a></td>
+ <td class="summary">Set callback for keyboard input.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="modules/udp.html">udp</a></td>
+ <td class="summary">UDP support.</td>
+ </tr>
+</table>
+<h2>Classes</h2>
+<table class="module_list">
+ <tr>
+ <td class="name" nowrap><a href="classes/buffer.html">buffer</a></td>
+ <td class="summary">Audio buffer for capture/playback.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/delay.html">delay</a></td>
+ <td class="summary">Digital delay line.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/gain.html">gain</a></td>
+ <td class="summary">Apply gain to signals.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/interp.html">interp</a></td>
+ <td class="summary">Interpolation.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/ladspa.html">ladspa</a></td>
+ <td class="summary">LADSPA plugin support.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/mixer.html">mixer</a></td>
+ <td class="summary">Mix signals.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/nullsink.html">nullsink</a></td>
+ <td class="summary">Reference otherwise disconnected nodes.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/oscil.html">oscil</a></td>
+ <td class="summary">Wavetable backed oscillators.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/pan.html">pan</a></td>
+ <td class="summary">Panning</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/playback.html">playback</a></td>
+ <td class="summary">Audio sample playback.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/sample.html">sample</a></td>
+ <td class="summary">Load audio samples.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/serial.html">serial</a></td>
+ <td class="summary">Read data on serial ports.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="classes/timer.html">timer</a></td>
+ <td class="summary">Time measurement.</td>
+ </tr>
+</table>
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/ldoc_fixed.css b/doc/ldoc_fixed.css
new file mode 100644
index 0000000..d7c7a6e
--- /dev/null
+++ b/doc/ldoc_fixed.css
@@ -0,0 +1,312 @@
+/* BEGIN RESET
+
+Copyright (c) 2010, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.com/yui/license.html
+version: 2.8.2r1
+*/
+html {
+ color: #000;
+ background: #FFF;
+}
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td {
+ margin: 0;
+ padding: 0;
+}
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+fieldset,img {
+ border: 0;
+}
+address,caption,cite,code,dfn,em,strong,th,var,optgroup {
+ font-style: inherit;
+ font-weight: inherit;
+}
+del,ins {
+ text-decoration: none;
+}
+li {
+ margin-left: 20px;
+}
+caption,th {
+ text-align: left;
+}
+h1,h2,h3,h4,h5,h6 {
+ font-size: 100%;
+ font-weight: bold;
+}
+q:before,q:after {
+ content: '';
+}
+abbr,acronym {
+ border: 0;
+ font-variant: normal;
+}
+sup {
+ vertical-align: baseline;
+}
+sub {
+ vertical-align: baseline;
+}
+legend {
+ color: #000;
+}
+input,button,textarea,select,optgroup,option {
+ font-family: inherit;
+ font-size: inherit;
+ font-style: inherit;
+ font-weight: inherit;
+}
+input,button,textarea,select {*font-size:100%;
+}
+/* END RESET */
+
+body {
+ margin-left: 1em;
+ margin-right: 1em;
+ font-family: arial, helvetica, geneva, sans-serif;
+ background-color: #ffffff; margin: 0px;
+}
+
+code, tt { font-family: monospace; font-size: 1.1em; }
+span.parameter { font-family:monospace; }
+span.parameter:after { content:":"; }
+span.types:before { content:"("; }
+span.types:after { content:")"; }
+.type { font-weight: bold; font-style:italic }
+
+body, p, td, th { font-size: .95em; line-height: 1.2em;}
+
+p, ul { margin: 10px 0 0 0px;}
+
+strong { font-weight: bold;}
+
+em { font-style: italic;}
+
+h1 {
+ font-size: 1.5em;
+ margin: 0 0 20px 0;
+}
+h2, h3, h4 { margin: 15px 0 10px 0; }
+h2 { font-size: 1.25em; }
+h3 { font-size: 1.15em; }
+h4 { font-size: 1.06em; }
+
+a:link { font-weight: bold; color: #004080; text-decoration: none; }
+a:visited { font-weight: bold; color: #006699; text-decoration: none; }
+a:link:hover { text-decoration: underline; }
+
+hr {
+ color:#cccccc;
+ background: #00007f;
+ height: 1px;
+}
+
+blockquote { margin-left: 3em; }
+
+ul { list-style-type: disc; }
+
+p.name {
+ font-family: "Andale Mono", monospace;
+ padding-top: 1em;
+}
+
+pre {
+ background-color: rgb(245, 245, 245);
+ border: 1px solid #C0C0C0; /* silver */
+ padding: 10px;
+ margin: 10px 0 10px 0;
+ overflow: auto;
+ font-family: "Andale Mono", monospace;
+}
+
+pre.example {
+ font-size: .85em;
+}
+
+table.index { border: 1px #00007f; }
+table.index td { text-align: left; vertical-align: top; }
+
+#container {
+ margin-left: 1em;
+ margin-right: 1em;
+ background-color: #ffffff;
+}
+
+#product {
+ text-align: center;
+ border-bottom: 1px solid #cccccc;
+ background-color: #ffffff;
+}
+
+#product big {
+ font-size: 2em;
+}
+
+#main {
+ background-color:#FFFFFF; // #f0f0f0;
+ border-left: 1px solid #cccccc;
+}
+
+#navigation {
+ position: fixed;
+ top: 0;
+ left: 0;
+ float: left;
+ width: 14em;
+ vertical-align: top;
+ background-color:#FFFFFF; // #f0f0f0;
+ border-right: 2px solid #cccccc;
+ overflow: visible;
+ overflow-y: scroll;
+ height: 100%;
+ padding-left: 1em;
+}
+
+#navigation h2 {
+ background-color:#FFFFFF;//:#e7e7e7;
+ font-size:1.1em;
+ color:#000000;
+ text-align: left;
+ padding:0.2em;
+ border-bottom:1px solid #dddddd;
+}
+
+#navigation ul
+{
+ font-size:1em;
+ list-style-type: none;
+ margin: 1px 1px 10px 1px;
+}
+
+#navigation li {
+ text-indent: -1em;
+ display: block;
+ margin: 3px 0px 0px 22px;
+}
+
+#navigation li li a {
+ margin: 0px 3px 0px -1em;
+}
+
+#content {
+ margin-left: 14em;
+ padding: 1em;
+ padding-left: 2em;
+ width: 700px;
+ border-left: 2px solid #cccccc;
+ // border-right: 2px solid #cccccc;
+ background-color: #ffffff;
+}
+
+#about {
+ clear: both;
+ padding-left: 1em;
+ margin-left: 14em; // avoid the damn sidebar!
+ border-top: 2px solid #cccccc;
+ border-left: 2px solid #cccccc;
+ background-color: #ffffff;
+}
+
+@media print {
+ body {
+ font: 12pt "Times New Roman", "TimeNR", Times, serif;
+ }
+ a { font-weight: bold; color: #004080; text-decoration: underline; }
+
+ #main {
+ background-color: #ffffff;
+ border-left: 0px;
+ }
+
+ #container {
+ margin-left: 2%;
+ margin-right: 2%;
+ background-color: #ffffff;
+ }
+
+ #content {
+ padding: 1em;
+ background-color: #ffffff;
+ }
+
+ #navigation {
+ display: none;
+ }
+ pre.example {
+ font-family: "Andale Mono", monospace;
+ font-size: 10pt;
+ page-break-inside: avoid;
+ }
+}
+
+table.module_list {
+ border-width: 1px;
+ border-style: solid;
+ border-color: #cccccc;
+ border-collapse: collapse;
+}
+table.module_list td {
+ border-width: 1px;
+ padding: 3px;
+ border-style: solid;
+ border-color: #cccccc;
+}
+table.module_list td.name { background-color: #f0f0f0; ; min-width: 200px; }
+table.module_list td.summary { width: 100%; }
+
+table.function_list {
+ border-width: 1px;
+ border-style: solid;
+ border-color: #cccccc;
+ border-collapse: collapse;
+}
+table.function_list td {
+ border-width: 1px;
+ padding: 3px;
+ border-style: solid;
+ border-color: #cccccc;
+}
+table.function_list td.name { background-color: #f6f6ff; ; min-width: 200px; }
+table.function_list td.summary { width: 100%; }
+
+dl.table dt, dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;}
+dl.table dd, dl.function dd {padding-bottom: 1em; margin: 10px 0 0 20px;}
+dl.table h3, dl.function h3 {font-size: .95em;}
+
+ul.nowrap {
+ overflow:auto;
+ whitespace:nowrap;
+}
+
+/* stop sublists from having initial vertical space */
+ul ul { margin-top: 0px; }
+ol ul { margin-top: 0px; }
+ol ol { margin-top: 0px; }
+ul ol { margin-top: 0px; }
+
+/* make the target distinct; helps when we're navigating to a function */
+a:target + * {
+ background-color: #FF9;
+}
+
+
+/* styles for prettification of source */
+pre .comment { color: #558817; }
+pre .constant { color: #a8660d; }
+pre .escape { color: #844631; }
+pre .keyword { color: #aa5050; font-weight: bold; }
+pre .library { color: #0e7c6b; }
+pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; }
+pre .string { color: #8080ff; }
+pre .number { color: #f8660d; }
+pre .function-name { color: #60447f; }
+pre .operator { color: #2239a8; font-weight: bold; }
+pre .preprocessor, pre .prepro { color: #a33243; }
+pre .global { color: #800080; }
+pre .user-keyword { color: #800080; }
+pre .prompt { color: #558817; }
+pre .url { color: #272fc2; text-decoration: underline; }
+
diff --git a/doc/modules/biquad.html b/doc/modules/biquad.html
new file mode 100644
index 0000000..4f89b1a
--- /dev/null
+++ b/doc/modules/biquad.html
@@ -0,0 +1,189 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Class_biquad_lowpass">Class biquad.lowpass </a></li>
+</ul>
+
+
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><strong>biquad</strong></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Module <code>biquad</code></h1>
+<p>Digital biquad filters.</p>
+<p>
+
+</p>
+
+
+<h2><a href="#Class_biquad_lowpass">Class biquad.lowpass </a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#biquad.lowpass.init">biquad.lowpass.init(input)</a></td>
+ <td class="summary">Create a lowpass filter.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#lowpass:cutoff">lowpass:cutoff(cut)</a></td>
+ <td class="summary">Set filter cutoff frequency.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#lowpass:resonance">lowpass:resonance(res)</a></td>
+ <td class="summary">Set filter resonance.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header has-description"><a name="Class_biquad_lowpass"></a>Class biquad.lowpass </h2>
+
+ <div class="section-description">
+ Lowpass filter.
+ </div>
+ <h3>Usage:</h3>
+ <pre class="example"><span class="keyword">local</span> mbiquad = <span class="global">require</span> <span class="string">'melisma.biquad'</span>
+<span class="keyword">local</span> input = ...
+<span class="keyword">local</span> lowpass = mbiquad.lowpass.<span class="function-name">init</span>(node, <span class="number">2000</span>, <span class="number">0.6</span>)
+lowpass:<span class="function-name">resonance</span>(<span class="number">1000</span>)
+lowpass:<span class="function-name">cutoff</span>(<span class="number">0.25</span>)</pre>
+ <dl class="function">
+ <dt>
+ <a name = "biquad.lowpass.init"></a>
+ <strong>biquad.lowpass.init(input)</strong>
+ </dt>
+ <dd>
+ Create a lowpass filter.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">input</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signal.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../modules/biquad.html#biquad.lowpass">biquad.lowpass</a></span>
+ The newly created lowpass filter.
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "lowpass:cutoff"></a>
+ <strong>lowpass:cutoff(cut)</strong>
+ </dt>
+ <dd>
+ Set filter cutoff frequency.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">cut</span>
+ <span class="types"><span class="type">number</span></span>
+ Cutoff frequency.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "lowpass:resonance"></a>
+ <strong>lowpass:resonance(res)</strong>
+ </dt>
+ <dd>
+ Set filter resonance.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">res</span>
+ <span class="types"><span class="type">number</span></span>
+ Resonance.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/modules/expression.html b/doc/modules/expression.html
new file mode 100644
index 0000000..e0f2f6e
--- /dev/null
+++ b/doc/modules/expression.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+<li><a href="#Class_script">Class script </a></li>
+</ul>
+
+
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><strong>expression</strong></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Module <code>expression</code></h1>
+<p>Build filters with arithmetic expressions.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> mexpression = <span class="global">require</span> <span class="string">'melisma.expression'</span>
+<span class="keyword">local</span> input = mepxression.input
+
+<span class="keyword">local</span> lhs = ...
+<span class="keyword">local</span> rhs = ...
+
+<span class="keyword">local</span> script = <span class="function-name">input</span>(lhs,<span class="number">0</span>) + <span class="number">0.5</span> * <span class="function-name">input</span>(rhs,<span class="number">10</span>)
+<span class="keyword">local</span> expression = script:<span class="function-name">build</span>()
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#input">input(sig, off)</a></td>
+ <td class="summary">Introduce an input signal in the expression.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#output">output(off)</a></td>
+ <td class="summary">Introduce the output signal in the expression.</td>
+ </tr>
+</table>
+<h2><a href="#Class_script">Class script </a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#script:build">script:build()</a></td>
+ <td class="summary">Compile an expression script.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "input"></a>
+ <strong>input(sig, off)</strong>
+ </dt>
+ <dd>
+ Introduce an input signal in the expression.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">sig</span>
+ <span class="types"><span class="type">channel</span></span>
+ Input signal.
+ </li>
+ <li><span class="parameter">off</span>
+ <span class="types"><span class="type">integer</span></span>
+ Offset in no. of samples.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../modules/expression.html#script">script</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "output"></a>
+ <strong>output(off)</strong>
+ </dt>
+ <dd>
+ Introduce the output signal in the expression.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">off</span>
+ <span class="types"><span class="type">integer</span></span>
+ Offset in no. of samples.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../modules/expression.html#script">script</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header has-description"><a name="Class_script"></a>Class script </h2>
+
+ <div class="section-description">
+ Represents an expression before compilation.
+Implements <code>__add</code>, <code>__sub</code>, <code>__mul</code> and <code>__div</code> for
+combining scripts in to larger ones.
+ </div>
+ <dl class="function">
+ <dt>
+ <a name = "script:build"></a>
+ <strong>script:build()</strong>
+ </dt>
+ <dd>
+ Compile an expression script.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><span class="type">expression</span></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/modules/fs.html b/doc/modules/fs.html
new file mode 100644
index 0000000..bfe5be3
--- /dev/null
+++ b/doc/modules/fs.html
@@ -0,0 +1,138 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+</ul>
+
+
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><strong>fs</strong></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Module <code>fs</code></h1>
+<p>File system utilities.</p>
+<p>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#readdir">readdir(path)</a></td>
+ <td class="summary">List directory contents.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "readdir"></a>
+ <strong>readdir(path)</strong>
+ </dt>
+ <dd>
+ List directory contents.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">path</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+ Directory path.
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.6">table</a></span>
+ Directory contents.
+ </ol>
+
+
+
+ <h3>Usage:</h3>
+ <ul>
+ <pre class="example"><span class="keyword">local</span> fs = <span class="global">require</span> <span class="string">'melisma.fs'</span>
+<span class="keyword">local</span> contents = fs.<span class="function-name">readdir</span>(<span class="string">'.'</span>)
+<span class="keyword">for</span> _,entry <span class="keyword">in</span> <span class="global">ipairs</span>(contents) <span class="keyword">do</span>
+ <span class="global">print</span>(entry.name, entry.<span class="global">type</span>)
+<span class="keyword">end</span></pre>
+ </ul>
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/modules/keycallback.html b/doc/modules/keycallback.html
new file mode 100644
index 0000000..af74b90
--- /dev/null
+++ b/doc/modules/keycallback.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Functions">Functions</a></li>
+</ul>
+
+
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><strong>keycallback</strong></li>
+ <li><a href="../modules/udp.html">udp</a></li>
+</ul>
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Module <code>keycallback</code></h1>
+<p>Set callback for keyboard input.</p>
+<p>
+
+
+<pre>
+<span class="keyword">local</span> mkeycallback = <span class="global">require</span> <span class="string">'melisma.keycallback'</span>
+
+mkeycallback.<span class="function-name">set</span>(<span class="keyword">function</span>(c)
+ <span class="global">print</span>(<span class="string">'you pressed'</span>, c)
+<span class="keyword">end</span>)
+</pre>
+
+</p>
+
+
+<h2><a href="#Functions">Functions</a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#set">set(fn)</a></td>
+ <td class="summary">Set the callback.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
+ Methods
+ <dl class="function">
+ <dt>
+ <a name = "set"></a>
+ <strong>set(fn)</strong>
+ </dt>
+ <dd>
+ Set the callback.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">fn</span>
+ <span class="types"><span class="type">function</span></span>
+ Callback function.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>
diff --git a/doc/modules/udp.html b/doc/modules/udp.html
new file mode 100644
index 0000000..f19c300
--- /dev/null
+++ b/doc/modules/udp.html
@@ -0,0 +1,311 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+<head>
+ <title>Melisma modules</title>
+ <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" />
+</head>
+<body>
+
+<div id="container">
+
+<div id="product">
+ <div id="product_logo"></div>
+ <div id="product_name"><big><b></b></big></div>
+ <div id="product_description"></div>
+</div> <!-- id="product" -->
+
+
+<div id="main">
+
+
+<!-- Menu -->
+
+<div id="navigation">
+<p><a href="/melisma-modules">Back to repository</a></p>
+<br/>
+<h1>Melisma modules</h1>
+
+
+<ul>
+ <li><a href="../index.html">Index</a></li>
+</ul>
+
+<h2>Contents</h2>
+<ul>
+<li><a href="#Class_sockaddr">Class sockaddr </a></li>
+<li><a href="#Class_socket">Class socket </a></li>
+</ul>
+
+
+<h2>Modules</h2>
+<ul class="nowrap">
+ <li><a href="../modules/biquad.html">biquad</a></li>
+ <li><a href="../modules/expression.html">expression</a></li>
+ <li><a href="../modules/fs.html">fs</a></li>
+ <li><a href="../modules/keycallback.html">keycallback</a></li>
+ <li><strong>udp</strong></li>
+</ul>
+<h2>Classes</h2>
+<ul class="nowrap">
+ <li><a href="../classes/buffer.html">buffer</a></li>
+ <li><a href="../classes/delay.html">delay</a></li>
+ <li><a href="../classes/gain.html">gain</a></li>
+ <li><a href="../classes/interp.html">interp</a></li>
+ <li><a href="../classes/ladspa.html">ladspa</a></li>
+ <li><a href="../classes/mixer.html">mixer</a></li>
+ <li><a href="../classes/nullsink.html">nullsink</a></li>
+ <li><a href="../classes/oscil.html">oscil</a></li>
+ <li><a href="../classes/pan.html">pan</a></li>
+ <li><a href="../classes/playback.html">playback</a></li>
+ <li><a href="../classes/sample.html">sample</a></li>
+ <li><a href="../classes/serial.html">serial</a></li>
+ <li><a href="../classes/timer.html">timer</a></li>
+</ul>
+
+</div>
+
+<div id="content">
+
+<h1>Module <code>udp</code></h1>
+<p>UDP support.</p>
+<p>
+
+
+
+<pre>
+<span class="keyword">local</span> mudp = <span class="global">require</span> <span class="string">'melisma.udp'</span>
+
+<span class="keyword">local</span> addr = mudp.sockaddr.<span class="function-name">inet</span>(<span class="string">'127.0.0.1'</span>,<span class="number">8000</span>)
+<span class="keyword">local</span> sock = mudp.socket.<span class="function-name">inet</span>()
+
+sock:<span class="function-name">send</span>(addr,<span class="string">'hello'</span>)
+sock:<span class="function-name">bind</span>(addr,<span class="global">print</span>)
+</pre>
+
+</p>
+
+
+<h2><a href="#Class_sockaddr">Class sockaddr </a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#sockaddr.inet">sockaddr.inet(host, port)</a></td>
+ <td class="summary">Create a internet domain address description.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#sockaddr.unix">sockaddr.unix(path)</a></td>
+ <td class="summary">Create a unix domain address description.</td>
+ </tr>
+</table>
+<h2><a href="#Class_socket">Class socket </a></h2>
+<table class="function_list">
+ <tr>
+ <td class="name" nowrap><a href="#socket.inet">socket.inet()</a></td>
+ <td class="summary">Create an internet domain socket.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#socket.unix">socket.unix()</a></td>
+ <td class="summary">Create a unix domain socket.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#socket:bind">socket:bind(addr, fn)</a></td>
+ <td class="summary">Bind a socket to an address.</td>
+ </tr>
+ <tr>
+ <td class="name" nowrap><a href="#socket:send">socket:send(addr, pkt)</a></td>
+ <td class="summary">Send a packet on a socket.</td>
+ </tr>
+</table>
+
+<br/>
+<br/>
+
+
+ <h2 class="section-header has-description"><a name="Class_sockaddr"></a>Class sockaddr </h2>
+
+ <div class="section-description">
+ Socket address description.
+ </div>
+ <dl class="function">
+ <dt>
+ <a name = "sockaddr.inet"></a>
+ <strong>sockaddr.inet(host, port)</strong>
+ </dt>
+ <dd>
+ Create a internet domain address description.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">host</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+
+
+
+ </li>
+ <li><span class="parameter">port</span>
+ <span class="types"><span class="type">integer</span></span>
+
+
+
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../modules/udp.html#sockaddr">sockaddr</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "sockaddr.unix"></a>
+ <strong>sockaddr.unix(path)</strong>
+ </dt>
+ <dd>
+ Create a unix domain address description.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">path</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+
+
+
+ </li>
+ </ul>
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../modules/udp.html#sockaddr">sockaddr</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+</dl>
+ <h2 class="section-header has-description"><a name="Class_socket"></a>Class socket </h2>
+
+ <div class="section-description">
+ Handle to a socket.
+ </div>
+ <dl class="function">
+ <dt>
+ <a name = "socket.inet"></a>
+ <strong>socket.inet()</strong>
+ </dt>
+ <dd>
+ Create an internet domain socket.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../modules/udp.html#socket">socket</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "socket.unix"></a>
+ <strong>socket.unix()</strong>
+ </dt>
+ <dd>
+ Create a unix domain socket.
+
+
+
+ <h3>Returns:</h3>
+ <ol>
+
+ <span class="types"><a class="type" href="../modules/udp.html#socket">socket</a></span>
+
+
+
+ </ol>
+
+
+
+
+</dd>
+ <dt>
+ <a name = "socket:bind"></a>
+ <strong>socket:bind(addr, fn)</strong>
+ </dt>
+ <dd>
+ Bind a socket to an address.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">addr</span>
+ <span class="types"><a class="type" href="../modules/udp.html#sockaddr">sockaddr</a></span>
+ Address description.
+ </li>
+ <li><span class="parameter">fn</span>
+ <span class="types"><span class="type">function</span></span>
+ Packet callback function.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+ <dt>
+ <a name = "socket:send"></a>
+ <strong>socket:send(addr, pkt)</strong>
+ </dt>
+ <dd>
+ Send a packet on a socket.
+
+
+ <h3>Parameters:</h3>
+ <ul>
+ <li><span class="parameter">addr</span>
+ <span class="types"><a class="type" href="../modules/udp.html#sockaddr">sockaddr</a></span>
+ Address description.
+ </li>
+ <li><span class="parameter">pkt</span>
+ <span class="types"><a class="type" href="https://www.lua.org/manual/5.3/manual.html#6.4">string</a></span>
+ Packet to send.
+ </li>
+ </ul>
+
+
+
+
+
+</dd>
+</dl>
+
+
+</div> <!-- id="content" -->
+</div> <!-- id="main" -->
+<div id="about">
+<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
+<i style="float:right;">Last updated 1980-01-01 00:00:00 </i>
+</div> <!-- id="about" -->
+</div> <!-- id="container" -->
+</body>
+</html>