[chuck-users] stupid n00bie question: Part III

Kassen signal.automatique at gmail.com
Tue Oct 16 10:54:35 EDT 2007

On 10/16/07, Martin Ahnelöv <operagasten at gmail.com> wrote:

Are you sure? Shouldn't it be counter/2? AFAIK, the sine crosses zero
> each other time.

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.

Another issue is this;

if(sampcounter > samplerate)

I think that should be "greater then or equal to". This way we are counting
over a period of "second + samp", I think?

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20071016/22e9ed06/attachment.htm 

More information about the chuck-users mailing list