clone45 / voxglitch

Modules for VCV Rack
GNU General Public License v3.0
100 stars 16 forks source link

WAV bank pitch shifting gets grainy on long samples #93

Closed 44100hertz closed 2 years ago

44100hertz commented 3 years ago

On long samples (over 1 minute 30 seconsd on my machine) the WAV bank pitch control gets more and more grainy the longer the sample is played. I looked at the code and I'm not sure why this happens, but my theory is that its due to storing sample position as a float rather than a double.

clone45 commented 3 years ago

This is really interesting. I'll take a peek at it this weekend. Thanks for reporting it! I wonder if my granulators have the same issue.

clone45 commented 3 years ago

Hi @44100hertz , when you say "grainy", do you mean that it becomes less continuous? I just pulled in a long sample and attached a knob module to the pitch input, and it seems to jump significantly (and discretely) between pitches. Is that what you're experiencing as well? It definitely seems like a bug to me, most likely in my pitch calculations. Let me know if this is what you're experiencing and I'll dive in deeper to figure out why it's happening.

Quick follow up. Is seems like you were 100% correct! When I changed sample position from a float to a double, it solved the issue. I'm going to do an audit of the other modules and submit the fix to VCV Rack as soon as I have time. (Within the next few days for sure.)

Thanks a ton for pointing this out to me!

clone45 commented 3 years ago

Holy crap. I owe you so many beers. This seems to be an issue with my granular modules as well. I'm so excited to fix this!!

44100hertz commented 3 years ago

Hi @44100hertz , when you say "grainy", do you mean that it becomes less continuous? I just pulled in a long sample and attached a knob module to the pitch input, and it seems to jump significantly (and discretely) between pitches. Is that what you're experiencing as well?

Yes this is exactly what I was referring to. I'm glad that the bug is being patched so readily.

clone45 commented 2 years ago

I think that this has been updated in the library!? Could you see if it's better for you now?

44100hertz commented 2 years ago

testing...

44100hertz commented 2 years ago

all good!