Reaktor - Primary , compare to zero

gentleclockdivider
gentleclockdivider Member Posts: 213 Helper
edited October 22 in Reaktor

When feeding the primary compare module a saw wave , and a comparison of 0 , it should spit out a value of 1 when equal , but it doesn't

ONly greater and smaller then works


Works ok

Greater then 0 , Multiplying output with sine ,

Equal to zero , nothing , it should at least spit out a spike

And not just for zero , equal doesn't work at all on an audio stream


Tagged:

Comments

  • gentleclockdivider
    gentleclockdivider Member Posts: 213 Helper

    NO luck in core either , input is saw , compare is 0 (other comparisons work )


  • colB
    colB Member Posts: 991 Guru
    edited April 17

    It will hit zero so rarely that you could wait for a long time.

    If you set up the frequency and the starting phase with enough precision you could probably set it so that you need to wait millions of years before it ever hits zero!

    Think about how a saw oscillator is implemented and you will understand immediately.

  • colB
    colB Member Posts: 991 Guru

    Yeah, you could have it never hit zero, or once per ~6000 years

    Or every cycle if you start on phase=zero and set the frequency to an exact integer division of the sample rate (might only work on a few specific frequencies due to floating point precision issues?)

  • gentleclockdivider
    gentleclockdivider Member Posts: 213 Helper

    yeah you're right

  • colB
    colB Member Posts: 991 Guru
    edited April 17

    Interesting now that I've tested it, on my system at 48KHz, in core, the frequency values that will generate exact zero matches are Sample Rate divided by some power of two... so F = SR/4, SR/16, SR/32 etc.


    I suppose that is because the resulting increment values will be exactly representable in binary with no precision error, so error doesn't accumulate.

This discussion has been closed.
Back To Top