<br><br><div><span class="gmail_quote">On 10/16/07, <b class="gmail_sendername">Martin Ahnelöv</b> &lt;<a href="mailto:operagasten@gmail.com">operagasten@gmail.com</a>&gt; wrote:</span><div><br>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Are you sure? Shouldn&#39;t it be counter/2? AFAIK, the sine crosses zero<br>each other time.</blockquote><div><br>I thought you could make zeroX only count postive zero crossings as well, that would make it a bit easier, though it you count all of them you can also count half-cycles which should give a lower rounding error. I can&#39;t explain the x4 issue either.
<br><br>Another issue is this;&nbsp;  <br><br>if(sampcounter &gt; samplerate)</div><br><br>I think that should be &quot;greater then or equal to&quot;. This way we are counting over a period of &quot;second + samp&quot;, I think?
<br><br><br>Generally I think we are way better off using Uanae, that should result in a faster response, less influence from hiss and complicated wave-forms and there is no need to use a LPF and set it&#39;s cut-off in a way that requires assumptions about the signal. There will still be a trade between response-time and accuracy but it&#39;s a more efficient trade and there is no way around that anyway.
<br><br><br>Kas.<br>
</div>