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

Factor interpolation out of Delay and InterpolatingDelay #60

Open
tap opened this issue Nov 11, 2015 · 6 comments
Open

Factor interpolation out of Delay and InterpolatingDelay #60

tap opened this issue Nov 11, 2015 · 6 comments
Assignees

Comments

@tap
Copy link
Member

tap commented Nov 11, 2015

Passing in the Interpolation implementation as template argument.

@nwolek nwolek self-assigned this Dec 25, 2015
@nwolek
Copy link
Member

nwolek commented Dec 25, 2015

With work on issue #56 done, it's time to work on this.

nwolek added a commit that referenced this issue Dec 26, 2015
nwolek added a commit that referenced this issue Dec 26, 2015
nwolek added a commit that referenced this issue Dec 26, 2015
@nwolek
Copy link
Member

nwolek commented Dec 26, 2015

These last three commits were super easy because of the tests in place. Good example of how testing benefits development.

Looking to @tap for guidance/input for other design work needed here. We still have separate Delay v DelayWithLinearInterpolation classes. I assume we would like one with the interpolation type as an option, right?

If so, we will need to reconcile the different number of samples require for individual interpolation types. Linear and Cosine require 2 samples, so it is possible for them to achieve zero sample delays. Cubic, Spline, and Hermite require 4 samples and will therefore create a minimum delay of one sample.

Maybe this is a situation where too many options is just a distraction? YAGNI?

@nwolek
Copy link
Member

nwolek commented Dec 26, 2015

Reading some of Julius Smith on the topic. He mentions only linear and allpass methods while covering Delay-Line Interpolation.

Allpass would be another option that only requires 2 samples. I am going to create another issue to implement this.

@tap
Copy link
Member Author

tap commented Dec 27, 2015

Cubic interpolation is quite important. A few familiar examples include the tapout~ and play~ objects in Max and tabread4 in Pd.

If you listen to the output of the wave~ object in Max and switch the @interp attribute you will hear a (in some cases tremendous) difference in sound quality.

@nwolek
Copy link
Member

nwolek commented Dec 28, 2015

Did not mean to suggest that we did not need interpolation! I was just pondering whether some types are better suited for delay-lines versus wavetables. And if that is the case, pouring effort into implementation of a variable type interpolation may not be the best allocation of efforts at the moment.

Guess we need to clarify what is necessary to close this issue.

@tap
Copy link
Member Author

tap commented Dec 28, 2015

"Discussion of delay accuracy with cubic interpolation":http://msp.ucsd.edu/techniques/v0.11/book-html/node114.html

"Linear and Allpass Interpolation @ McGill":http://www.music.mcgill.ca/~gary/618/week1/delayline.html

"PDF on Interpolation":http://home.deib.polimi.it/bestagini/_Slides/lesson_3.pdf -- might be able to step back from this and think not only of cubic interpolation on it's own, but Nth-order interpolation for which cubic is simply one case.

Also, here are "the delay implementations from SuperCollider":https://github.com/supercollider/supercollider/blob/master/server/plugins/DelayUGens.cpp, FWIW.

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

No branches or pull requests

2 participants