nodeseq - Executes a node and appends outputs at given times.
Inputs:
module [STRING] [REQUIRED]: module to execute.
times [BUFFER] [REQUIRED]: times at which to append outputs.
input0 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #0.
input1 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #1.
input2 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #2.
input3 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #3.
input4 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #4.
input5 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #5.
input6 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #6.
input7 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #7.
input8 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #8.
input9 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #9.
input10 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #10.
input11 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #12.
input12 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #13.
input13 [BUFFER|FLOAT|STRING] [OPTIONAL]: forward to module’s input slot #14.
Outputs:
out [BUFFER]: output buffer.
nodeseq takes a module name and a buffer of times, and will internally instantiate a node of the give module and run it at the specified times. It will output the resulting buffer in out.
Furthermore, passthrough inputs can be specified, those will be mapped to the internal node’s inputs in the following way:
floats |
passed through directly. |
strings
passed through directly.
buffers
interpolated according to each emission time and passed through as a float. There is no way to pass an entire buffer to the internal node, you should wrap the desired module into another module if passing a buffer is required.
The slot number is straight-forward: for internal nodes it is the index of the input given in the help or man page, for exported modules it is the index of the respective export input command.
A bleep.sndc file emitting a single bleep:
export input o.freq as frequency;
export output out.out as out;
o: osc {
function: "sin";
freq: 440;
duration: 1;
}
decay: func {
expr: "$0 * exp(-$1 * $t)";
duration: 1;
sampling: 100;
param0: 1;
param1: 30;
}
out: mix {
input0: o.out;
gain0: decay.out;
}
A bleeps.sndc file using nodeseq to generate multiple bleeps at randomized times.
import "bleep.sndc" as bleep;
times: func {
/* we generate a bunch of slightly randomized timestamps
from 0 to 10 seconds */
expr: "$s * 10 + $r / 2";
/* sampling =
15 and duration = 1 means a total of 15 samples so 15
timestamps */
sampling: 15;
duration: 1;
}
n: nodeseq {
module: "bleep";
times: times.out;
/* this will be
passed through as the bleep frequency since
’frequency’
* is the first exported input in the bleep module
*/
input0: 220;
}