jamoma / jamoma2

A header-only C++ library for building dynamic and reflexive systems with an emphasis on audio and media.
MIT License
30 stars 6 forks source link

Explore potential redesign of interpolators #78

Open nwolek opened 8 years ago

nwolek commented 8 years ago

Quoting from @tap during discussion of this pull request:

I don't know if this is a great idea or a terrible one, but I'm imagining something where we pass C++ iterators as the arguments. By doing this all functions would look something like this pseudo-code:

constexpr T operator()(double delta, std::vector<T>::const_iterator begin, std::vector<T>::const_iterator end) noexcept {
    // so we have a range within a vector now between begin and end
    // that might be 2 samples or 4 or 8, etc...
    // but we should be able figure that out and do the right thing...
}

I'm not sure if this would solve all our ills or just create new ones, but it make sense to explore this further.