<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 24, 2019 at 12:38 PM Johannes Lorenz <<a href="mailto:j.spam@lorenz-ho.me">j.spam@lorenz-ho.me</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif"></span>Counting zero crossings prevents <br>
clicking on lower notes, and it makes higher notes more punchy.</blockquote><div><br></div><div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">There's fundamentally no such thing as a zero crossing. You might have two samples on either side of zero, but you still don't have a sample *at* zero, so in the general case, truncating one of them to zero and starting/ending there is still going to give you distortion and/or noise. Obviously there may be cases where one of them is close enough to zero for this not to be be an issue, but it's not a general method.<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Ardour applies declick fades every time the transport starts and stops. You can read about how we do it here:</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><a href="https://github.com/Ardour/ardour/blob/master/libs/ardour/ardour/disk_reader.h#L135">https://github.com/Ardour/ardour/blob/master/libs/ardour/ardour/disk_reader.h#L135</a></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><a href="https://github.com/Ardour/ardour/blob/master/libs/ardour/disk_reader.cc#L1445">https://github.com/Ardour/ardour/blob/master/libs/ardour/disk_reader.cc#L1445</a></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><a href="https://github.com/Ardour/ardour/blob/master/libs/ardour/amp.cc#L163">https://github.com/Ardour/ardour/blob/master/libs/ardour/amp.cc#L163</a></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div></div></div></div>