h4yn0nnym0u5e
Well-known member
The design intent of this branch was to preserve the original functionality, while adding abilities to bend pitch and get to lower notes. (There’s even a TODO comment in Paul’s original code about the latter.) A side-effect of bending the pitch was better intonation, because it needed the fractional sample capability.
As such, the feedback filter was intentionally left as the same minimal average of two samples, which in itself turned out to be much harder than I expected. The code you’ve worked with previously wasn’t acceptable for some reason, probably due to poor sustain given the sequence of commit comments; I believe I was averaging the wrong two samples.
Either way, I believe there has to be some sort of filter in the delay / feedback loop, otherwise the algorithm simply won’t work. I did briefly toy with putting a more versatile filter in the loop, by re-using some of the other Audio library code, but quickly got bogged down and abandoned the effort. I don’t recall why now, but it was likely due to having to deal with notes higher than ~344Hz, i.e. with a period of less than one audio block.
It may be useful if you were to fork my code, make changes that suit your usage, and let us know when you’re happy - maybe you already are? Then we can try your code out. I would caution against using bit shifts like you have in post #16. I think that’s remnants of my code, and it turns out there’s subtle differences compared to a true division when it comes to negative numbers, which IIRC resulted in the infinite low-level sustain mentioned before. You’ll see the use of the
As such, the feedback filter was intentionally left as the same minimal average of two samples, which in itself turned out to be much harder than I expected. The code you’ve worked with previously wasn’t acceptable for some reason, probably due to poor sustain given the sequence of commit comments; I believe I was averaging the wrong two samples.
Either way, I believe there has to be some sort of filter in the delay / feedback loop, otherwise the algorithm simply won’t work. I did briefly toy with putting a more versatile filter in the loop, by re-using some of the other Audio library code, but quickly got bogged down and abandoned the effort. I don’t recall why now, but it was likely due to having to deal with notes higher than ~344Hz, i.e. with a period of less than one audio block.
It may be useful if you were to fork my code, make changes that suit your usage, and let us know when you’re happy - maybe you already are? Then we can try your code out. I would caution against using bit shifts like you have in post #16. I think that’s remnants of my code, and it turns out there’s subtle differences compared to a true division when it comes to negative numbers, which IIRC resulted in the infinite low-level sustain mentioned before. You’ll see the use of the
lvMul constant introduced in this commit - it seems to work OK without drastically increasing CPU usage.