From 039847a29868d335c08fe0a587260dffc71ca5c4 Mon Sep 17 00:00:00 2001 From: Ludvig Gunne Lindström Date: Fri, 17 Jul 2026 11:43:24 +0200 Subject: init --- doc/modules/biquad.html | 189 ++++++++++++++++++++++++++ doc/modules/expression.html | 221 ++++++++++++++++++++++++++++++ doc/modules/fs.html | 138 +++++++++++++++++++ doc/modules/keycallback.html | 133 ++++++++++++++++++ doc/modules/udp.html | 311 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 992 insertions(+) create mode 100644 doc/modules/biquad.html create mode 100644 doc/modules/expression.html create mode 100644 doc/modules/fs.html create mode 100644 doc/modules/keycallback.html create mode 100644 doc/modules/udp.html (limited to 'doc/modules') 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 @@ + + + + + Melisma modules + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module biquad

+

Digital biquad filters.

+

+ +

+ + +

Class biquad.lowpass

+ + + + + + + + + + + + + +
biquad.lowpass.init(input)Create a lowpass filter.
lowpass:cutoff(cut)Set filter cutoff frequency.
lowpass:resonance(res)Set filter resonance.
+ +
+
+ + +

Class biquad.lowpass

+ +
+ Lowpass filter. +
+

Usage:

+
local mbiquad = require 'melisma.biquad'
+local input = ...
+local lowpass = mbiquad.lowpass.init(node, 2000, 0.6)
+lowpass:resonance(1000)
+lowpass:cutoff(0.25)
+
+
+ + biquad.lowpass.init(input) +
+
+ Create a lowpass filter. + + +

Parameters:

+
    +
  • input + channel + Input signal. +
  • +
+ +

Returns:

+
    + + biquad.lowpass + The newly created lowpass filter. +
+ + + + +
+
+ + lowpass:cutoff(cut) +
+
+ Set filter cutoff frequency. + + +

Parameters:

+
    +
  • cut + number + Cutoff frequency. +
  • +
+ + + + + +
+
+ + lowpass:resonance(res) +
+
+ Set filter resonance. + + +

Parameters:

+
    +
  • res + number + Resonance. +
  • +
+ + + + + +
+
+ + +
+
+
+generated by LDoc 1.5.0 +Last updated 1980-01-01 00:00:00 +
+
+ + 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 @@ + + + + + Melisma modules + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module expression

+

Build filters with arithmetic expressions.

+

+ + + +

+local mexpression = require 'melisma.expression'
+local input = mepxression.input
+
+local lhs = ...
+local rhs = ...
+
+local script = input(lhs,0) + 0.5 * input(rhs,10)
+local expression = script:build()
+
+ +

+ + +

Functions

+ + + + + + + + + +
input(sig, off)Introduce an input signal in the expression.
output(off)Introduce the output signal in the expression.
+

Class script

+ + + + + +
script:build()Compile an expression script.
+ +
+
+ + +

Functions

+ Methods +
+
+ + input(sig, off) +
+
+ Introduce an input signal in the expression. + + +

Parameters:

+
    +
  • sig + channel + Input signal. +
  • +
  • off + integer + Offset in no. of samples. +
  • +
+ +

Returns:

+
    + + script + + + +
+ + + + +
+
+ + output(off) +
+
+ Introduce the output signal in the expression. + + +

Parameters:

+
    +
  • off + integer + Offset in no. of samples. +
  • +
+ +

Returns:

+
    + + script + + + +
+ + + + +
+
+

Class script

+ +
+ Represents an expression before compilation. +Implements __add, __sub, __mul and __div for +combining scripts in to larger ones. +
+
+
+ + script:build() +
+
+ Compile an expression script. + + + +

Returns:

+
    + + expression + + + +
+ + + + +
+
+ + +
+
+
+generated by LDoc 1.5.0 +Last updated 1980-01-01 00:00:00 +
+
+ + 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 @@ + + + + + Melisma modules + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module fs

+

File system utilities.

+

+ +

+ + +

Functions

+ + + + + +
readdir(path)List directory contents.
+ +
+
+ + +

Functions

+ Methods +
+
+ + readdir(path) +
+
+ List directory contents. + + +

Parameters:

+
    +
  • path + string + Directory path. +
  • +
+ +

Returns:

+
    + + table + Directory contents. +
+ + + +

Usage:

+
    +
    local fs = require 'melisma.fs'
    +local contents = fs.readdir('.')
    +for _,entry in ipairs(contents) do
    +	print(entry.name, entry.type)
    +end
    +
+ +
+
+ + +
+
+
+generated by LDoc 1.5.0 +Last updated 1980-01-01 00:00:00 +
+
+ + 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 @@ + + + + + Melisma modules + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module keycallback

+

Set callback for keyboard input.

+

+ + +

+local mkeycallback = require 'melisma.keycallback'
+
+mkeycallback.set(function(c)
+    print('you pressed', c)
+end)
+
+ +

+ + +

Functions

+ + + + + +
set(fn)Set the callback.
+ +
+
+ + +

Functions

+ Methods +
+
+ + set(fn) +
+
+ Set the callback. + + +

Parameters:

+
    +
  • fn + function + Callback function. +
  • +
+ + + + + +
+
+ + +
+
+
+generated by LDoc 1.5.0 +Last updated 1980-01-01 00:00:00 +
+
+ + 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 @@ + + + + + Melisma modules + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module udp

+

UDP support.

+

+ + + +

+local mudp = require 'melisma.udp'
+
+local addr = mudp.sockaddr.inet('127.0.0.1',8000)
+local sock = mudp.socket.inet()
+
+sock:send(addr,'hello')
+sock:bind(addr,print)
+
+ +

+ + +

Class sockaddr

+ + + + + + + + + +
sockaddr.inet(host, port)Create a internet domain address description.
sockaddr.unix(path)Create a unix domain address description.
+

Class socket

+ + + + + + + + + + + + + + + + + +
socket.inet()Create an internet domain socket.
socket.unix()Create a unix domain socket.
socket:bind(addr, fn)Bind a socket to an address.
socket:send(addr, pkt)Send a packet on a socket.
+ +
+
+ + +

Class sockaddr

+ +
+ Socket address description. +
+
+
+ + sockaddr.inet(host, port) +
+
+ Create a internet domain address description. + + +

Parameters:

+
    +
  • host + string + + + +
  • +
  • port + integer + + + +
  • +
+ +

Returns:

+
    + + sockaddr + + + +
+ + + + +
+
+ + sockaddr.unix(path) +
+
+ Create a unix domain address description. + + +

Parameters:

+ + +

Returns:

+
    + + sockaddr + + + +
+ + + + +
+
+

Class socket

+ +
+ Handle to a socket. +
+
+
+ + socket.inet() +
+
+ Create an internet domain socket. + + + +

Returns:

+
    + + socket + + + +
+ + + + +
+
+ + socket.unix() +
+
+ Create a unix domain socket. + + + +

Returns:

+
    + + socket + + + +
+ + + + +
+
+ + socket:bind(addr, fn) +
+
+ Bind a socket to an address. + + +

Parameters:

+
    +
  • addr + sockaddr + Address description. +
  • +
  • fn + function + Packet callback function. +
  • +
+ + + + + +
+
+ + socket:send(addr, pkt) +
+
+ Send a packet on a socket. + + +

Parameters:

+
    +
  • addr + sockaddr + Address description. +
  • +
  • pkt + string + Packet to send. +
  • +
+ + + + + +
+
+ + +
+
+
+generated by LDoc 1.5.0 +Last updated 1980-01-01 00:00:00 +
+
+ + -- cgit v1.3.1