Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of "hint_min_samplerate" and semi-piecewise interpolation #566

Closed
wants to merge 90 commits into from
Closed

Conversation

PythonBlue
Copy link
Contributor

This pull request implements optional voice oversampling via the ARIA-specific opcode "hint_min_samplerate".

Also implemented a custom interpolation mode that, when combined with said oversampling, can sound convincing to alias-free piecewise interpolation. To activate this interpolation, one needs to set the "sample_quality" to 0.

Third significant change was allowing the resonance to go as low as "-3" as I felt 0 sounded a little too sudden of a cutoff to me. This much can be ommitted from the main repo if necessary.

@jpcima
Copy link
Collaborator

jpcima commented Nov 25, 2020

Some quick remarks

  • sample_quality 0 is not implemented. It's just a clause to add in Voice.cpp fillInterpolatedWithQuality with the quality kInterpolatorLinear. This would be good as a PR of its own. It will be a SFZ extension.
  • I've got a feeling that the IIR technique would be inefficient at high rates. Perhaps at low rates we can depend on the half-band technique (as exists now);
    upper rates could use Polyphase FIR technique? then these frames that will be discarded by decimating can be skipped altogether, and also FIR is not autodepent of its output, which opens the possibilities of SIMD implementation

@jpcima
Copy link
Collaborator

jpcima commented Nov 28, 2020

@PythonBlue
Copy link
Contributor Author

It does, yes, and it is the same premise. Basically, my method of interpolation is meant to get close to the desired sound of the imaging frequencies, while controlling the obvious aliasing that happens when said frequencies exceed the Nyquist.

@paulfd
Copy link
Member

paulfd commented Oct 15, 2021

Do you mind if I extract the part about the cutoff curves in separate PRs?

@PythonBlue
Copy link
Contributor Author

Do you mind if I extract the part about the cutoff curves in separate PRs?

Not at all. I should've updated this pull request anyway to say that "hint_min_samplerate" was eventually dropped in my fork due to the complexity of updating with the newer commits. Feel free to borrow and refine my code for the attack/decay/release_shape opcodes as well if you wish.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants