Skip to content

Phasor doesn't play nice with negative frequencies #201

@v7b1

Description

@v7b1

The setFreq method of the Phasor class accepts negative values, which is nice cause it would allow the phasor to run in reverse (ramp down).
But the Process() routine clips negative phase values to zero instead of wrapping to the maximum value.

Should probably be something like:

if(phs_ < 0.0f) { phs_ += TWOPI_F; // phs_ = 0.0f; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions