rsc3/doc/help/ugen/fft/pv-copy.help.scrbl

35 lines
731 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(pv-copy bufferA bufferB)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Copies the spectral frame in bufferA to bufferB at that point in
the chain of PV UGens. This allows for parallel processing of
spectral data without the need for multiple fft UGens, and to copy
out data at that point in the chain for other purposes. bufferA and
bufferB must be the same size.
bufferA - source buffer.
bufferB - destination buffer.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(with-sc3
(lambda (fd)
(async fd (b-alloc 0 2048 1))
(async fd (b-alloc 1 2048 1))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00
Proof of concept, silence
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(let* ((in (lfclip-noise ar 100))
(c0 (fft* 0 in))
(c1 (pv-copy c0 1)))
(audition (out 0 (sub (ifft* c0) (ifft* c1)))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00