Skip to content

Waveform source: support really slow rates with fractional steps #11

@guruofquality

Description

@guruofquality

When we dont want to or cant generate wave tables any larger, and approximation of the waveform could be made by accumulating fractional steps and rounding off the index to the nearest table entry:

if (stepFloat < 1.0)
{
        for (size_t i = 0; i < outPort->elements(); i++)
        {
            out[i] = _table[_index & _mask];
            _offset += _stepFloat;
            //TODO when abs(offset) >= 1.0, move its integer part into index
        }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions