The mistake in your code is that you totally discard the negative half of the sinc function. I think you meant something like this instead:
val = Sinc(-num_zero_crossings + 2 * t * num_zero_crossings);
Then the other mistake is to use BLEP instead of minBLEP (more practical to use because the response is completely causal). And then to use minBLEP instead of polyBLEP
Hi pichenettes,
Thanks for your answer. Yes I meant:
val = Sinc(-num_zero_crossings + 2 * t * num_zero_crossings);
I did a mistake when I wrote it here.
Yes i’m aware about polyblep but the idea is to apply more than 2 points correction. Is it possible with polyblep ?
Concerning minblep, I’ve heard that this method introduce more problem than it solves and that linear BLEP worth the effort. I should also mentionne I want to implement hard sync.
About the BLEP kernel is the window applied at the right moment (before integration) ?
Thanks again for your help !
Everything works as expected (no noise appearing).
The aliasing reduction is okay but sometime I got some noise appearing in my freq analyser.
I suspected the kernel because when I replace the DoBlep1 and Doblep2 by approximation (polyblep) there is no problem !
But maybe I should go with minblep or 4 point polyblep if it’s possible ?
What do you think about minblep ? Did it really introduce more problems ? Or is it as simple as using a more complex kernel and then forgot about lookahead ?
Thanks again for your help !
It would help if you posted directly your project - the actual code you’re trying to run. After all, there could be a bug in LinInterpo… and we’re not going very far if all the mistakes I detect are copy/paste error from your code to the other.
An oddity: in DoBlep1, you do t = 1 - tand then use (1 - t)when computing the index. So t is not changed at all?
Hey pichnettes,
You’re right, I didn’t see the oddity. I Edited my code adding the interpolation part. I also add the polyblep function I use to compare with the BLEP. I didn’t post all the project because it’s a max msp external, so I thought it won’t be good for clarity but I will if you think it’s needed.
Thanks again for your help, I really appreciate this !