ZeroXBufWr analyses zero crossings from an input signal and writes the signal and the zero crossing indices to buffers. It is intended to be used with ZeroXBufRd and TZeroXBufRd, see these help files for more examples.
Thanks to Tommaso Settimi for an inspiring discussion, which gave me a nudge to tackle these classes.
Creates a new ZeroXBufWr ar UGen.
in |
Signal to be analysed, size must correspond to sndBuf and zeroXBuf. |
sndBuf |
Buffer or SequenceableCollection of Buffers to write signals to, size must correspond to in and zeroXBuf, writing can be disabled with writeSndBuf. The length of sndBuf determines the trigger for the doneAction. |
zeroXBuf |
Buffer or SequenceableCollection of Buffers to write anaysis data to, size must correspond to in and sndBuf. |
startWithZeroX |
Number 0 or 1 or SequenceableCollection of such, determining whether the first sample should be regarded as zero crossing. Defaults to 0. |
adjustZeroXs |
One of the Numbers -1, 0, 1, 2 or a SequenceableCollection of such.
Actions 1 and 2 can lead to smoother half wavesets, see examples. Defaults to 0. |
doneAction |
Done action be performed after the duration of the longest buffer of sndBuf. Defaults to 0. |
See the ZeroXBufRd and TZeroXBufRd help files for more examples