20. Offline Rendering
20.1. What is Offline Rendering?
Offline rendering, or faster-than-realtime render, refers to generating sound without running it in realtime. Offline rendering is a tremendously necessary feature for any musical system. It helps in preserving/documenting a piece, and it can be very useful in debugging scenarios. Furthermore, the hope is to explore the offline medium to generate static animated audio-visual content.
20.2. Manual Compute from Scheme
Really, all that is needed is to be able to compute the DSP kernel for an
arbitrary number of samples. File rendering can be done using nodes
like wavout
. Frames can be written to disk every N samples inside of
loops to produce animations.
Compute can be done using the function monolith:compute
. NOTE: realtime
audio should be disabled.
{"monolith:compute", pp_compute, 1, 1, {INT,___,___}},
All this function has to do is call monolith_compute
, passing in a NULL
value to the out parameter. This compute function will let the DSP kernel
to compute, but not write.
static cell pp_compute(cell x) {
int nsmps;
nsmps = integer_value("monolith:compute", car(x));
monolith_compute(monolith_data_get(), nsmps, NULL);
return UNSPECIFIC;
}
prev | home | next