Skip to content

Idea: Functional programming instead of lookup table #28

@Mrugalla

Description

@Mrugalla

I wanna know your opinion on the following idea:

What if instead of filling a table of 128 frequencies, the MTS-ESP master requires the developer to implement two std::function<double(double)> where one of them converts pitch to freq and the other one freq to pitch. the downside of this approach would be that it would perform slightly worse, because it's std::function and it always has to calculate things instead of just reading from a table. (people could still just use an array and just reference it in their functions or use an approximation function, tho so it's fine) but the good thing about it is, that there could be non-integer in- and outputs of those functions and they would all be absolutely correct without any need for interpolation, which is really useful. we could be like "what's at pitch 12.5?" or "which pitch is at 420hz?" directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions