logoalt Hacker News

dupedtoday at 12:36 AM1 replyview on HN

You often want sample accurate waveform visualization when tuning samples that are time or pitch warped to set start and loop points at zero crossings to avoid clicks without needing fades.


Replies

PaulDavisThe1sttoday at 12:58 AM

Overwhelmingly, there's no such thing as a zero crossing. Your closest real world case is a point in time (between samples) where the previous sample is positive and next one is negative (or vice versa). However, by truncating the next sample to zero, you create distortion (and if the absolute value of the preceding sample is large, very significant distortion.

Zero crossings were an early myth in digital audio promulgated by people who didn't know enough.

Fades are always the best solution in terms of limiting distortion (though even then, they can fail in pathological situations).

show 1 reply