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:
- output(off)
-
Introduce the output signal in the expression.
Parameters:
- off integer Offset in no. of samples.
Returns:
Class script
Represents an expression before compilation.
Implements
__add, __sub, __mul and __div for
combining scripts in to larger ones.