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

Complex buffer interpolation #570

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

JanosGit
Copy link

@JanosGit JanosGit commented Aug 8, 2019

As proposed here https://forum.juce.com/t/resample-a-complex-valued-buffer-without-de-interleaving-the-buffer/34703/2, I think it's useful to extend the interpolator classes to accept more than just float values.

The pull request contains a refactored version of both LagrangeInterpolator and CatmullRomInterpolator that are fully templated and now share a common base class ResamplerBase. This makes it possible to use them with double buffers as well as std::complex valued buffers. With that changed both classes were renamed to LagrangeResampler and CatmullRomResampler, adding an alias to the previous names that has float as default SampleType template values. This makes the change fully backwards compatible to existing code.

Furthermore FloatVectorOperations, which are used internally, were extended to accept complex buffers where possible.

Based on these changes, a support for SIMDRegister as SampleType type for the interpolators should also not be to hard to implement, making theses classes compatible to the DSP module template processor classes that also accept SIMDRegister as SampleType.

…oatVectorOperations

Converted LagrangeInterpolator and CatmullRomInterpolator to templated classes making it possible to specify a double or std::complex sample as SampleType. Added interfaces for std::complex values to FloatVectorOperations for all useful cases.
@JanosGit JanosGit changed the base branch from master to develop August 8, 2019 13:24
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.

None yet

1 participant