snap to zero crossing
Hello all.
I have been searching the max list about this, but haven't found anything that answers my question:
Is there any way to find the "nearest zero crossing" point in a buffer without using waveform~ or tap.buffer.snap~?
I am using both in a Poly~ and the CPU hit is dearer than I'd like....
At the moment I am simply feeding a Wave~ a start and endpoint, and using waveform~ to snap to the nearest zero crossing to prevent clickiness.
Any other way to do this I have missed?
All the best, Jeremy
Jeremy Keenan schrieb:
> I am using both in a Poly~ and the CPU hit is dearer than I'd
> like....
I can't imagine that an abstraction would do it more effective than
tap.buffer.snap~, but just count on to the next zero crossing left and
right and take the shorter one...
You might want to limit the range, as it is well possible that the next
zero crossing is two hours awy from your starting point... ;-)
See if thats faster than the others...
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
pre-analyzing the buffer content and building a second lookup buffer might also be a strategy to consider. i am doing this quite a lot in java, there it is quite easy (and fast) to precalculate some kind of offset lookup buffer (with equal size of the original one) that stores at each index the position of the nearest zerocrossing.
micha