<br><br><div><span class="gmail_quote">On 10/16/07, <b class="gmail_sendername">Martin Ahnelöv</b> <<a href="mailto:operagasten@gmail.com">operagasten@gmail.com</a>> wrote:</span><div><br> </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'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't explain the x4 issue either.
<br><br>Another issue is this; <br><br>if(sampcounter > samplerate)</div><br><br>I think that should be "greater then or equal to". This way we are counting over a period of "second + samp", 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'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's a more efficient trade and there is no way around that anyway.
<br><br><br>Kas.<br>
</div>