func - A generator for mathematical functions.
Inputs:
expr [STRING] [REQUIRED]: mathematical function in infixe notation.
- use
’$s’ for position within buffer (0.0 to 1.0)
- use ’$t’ for time (0.0 to
’duration’)
- use ’$n’ for sample number
- use ’$r’ for random number between 0 and 1
- use ’$<N>’ for param<N>
duration [FLOAT] [REQUIRED]: duration
of resulting signal.
sampling [FLOAT] [OPTIONAL]: sampling rate of resulting signal, def 44100.
interp [STRING] [OPTIONAL]: interpolation of resulting buffer, def ’linear’.
param0 [BUFFER|FLOAT] [OPTIONAL]: param 0 for mathematical function, ’$0’.
param1 [BUFFER|FLOAT] [OPTIONAL]: param 1 for mathematical function, ’$1’.
param2 [BUFFER|FLOAT] [OPTIONAL]: param 2 for mathematical function, ’$2’.
param3 [BUFFER|FLOAT] [OPTIONAL]: param 3 for mathematical function, ’$3’.
param4 [BUFFER|FLOAT] [OPTIONAL]: param 4 for mathematical function, ’$4’.
param5 [BUFFER|FLOAT] [OPTIONAL]: param 5 for mathematical function, ’$5’.
param6 [BUFFER|FLOAT] [OPTIONAL]: param 6 for mathematical function, ’$6’.
param7 [BUFFER|FLOAT] [OPTIONAL]: param 7 for mathematical function, ’$7’.
param8 [BUFFER|FLOAT] [OPTIONAL]: param 8 for mathematical function, ’$8’.
param9 [BUFFER|FLOAT] [OPTIONAL]: param 9 for mathematical function, ’$9’.
Outputs:
out [BUFFER]: resulting signal.
A versatile, arbitrary mathematical function generator.
Generates a buffer of specified duration and sampling rate. For each output sample, the node evaluates expr with updated variables. Those variables are:
$s |
position within buffer from 0 to 1. | ||
$t |
time of current sample (essentially $s multiplied by duration). | ||
$n |
index of sample. | ||
$r |
a random number between 0 and 1. |
$param<N>
an interpolated value from one of the given parameters.
Ten optional parameters can be used in the infixe expression given in expr. When given as buffer, the value $param<N> is an interpolation of the buffer given in param<N> at the current sample position.