electro-smith / DaisySP

A Powerful DSP Library in C++
https://www.electro-smith.com/daisy
Other
836 stars 131 forks source link

Pitch shifter accepts transpose < 0.0f but does not work #162

Open jfsantos opened 2 years ago

jfsantos commented 2 years ago

The pitch shifter implementation seems to only work for transpose > 0.0f, but the function takes a float as input. If the function does not allow transposing down, it should at least be indicated in the documentation? Or is it supposed to work and I am doing something wrong?

stephenhensley commented 2 years ago

@jbeda akaik the pitch shifter should accept negative values.

That said, I recall there being a bit of an issue with the math, and it not being semitone-accurate with a negative value. So it's possible someone added a clamp to prevent that.

Thanks for pointing this out, we'll look into it and get it fixed up ASAP.