97. cabtmp

cabtmp creates a temporary cable and initialize it to be signal in. cabtmp will first try to snatch a buffer from the buffer pool. If there are no free buffers in the pool, it will allocate one. When the cable is no longer being used, it must be explicitly freed with cabclr.

cabtmp is currently the most ideal way to handle signals that modulate many things at once (global clocks, LFOs, signals processed by filter banks, etc). In practice, a signal would be copied using cabtmp, held with bhold, then stored using cabset and maybe nextfree if the register didn't matter. From there cabget would be used to efficiently retrieve the signal, and then cabclr would be called when the signal was no longer being needed.

<<ugens-top>>=
(define (cabtmp in)
  (param in)
  (rvl "cabtmp"))



prev | home | next