So I know there have been many discussions on this forum on ways to rid zipper noise on a pot when changing the delay time. I have found that a piece of code that Frank worked up seems to do a pretty acceptable job. However, I have noticed upon start up that it sounds as if the delay time is being ramped up regardless of where the actual pot is. I was curious if anyone knows of a way to get around this.
rdax pot1,1 ;load pot1
and %01111111_00000000_00000000 ;don't make jumps too small
sof 61/64,3/64 ;50 ms to 1 second
rdfx pot1fil,0.015 ;filter pot1 ~ 80Hz
wrax pot1fil,0 ;save to pot1fil, clear ACC
or length*256 ;delay length into ACC aligned to ACC[22:8]
mulx pot1fil ;multiply by filtered pot1
rdfx delread,smooth ;add delread scaled by smooth
wrax delread,1 ;save to delread, pass on
wrax addr_ptr,0 ;write to address pointer, clear ACC
I tried initializing pot1fil to pot1's value at start up with no luck. Initializing the address pointer yielded the same results as did clearing the delay mem on start up.
Initializing pot1fil and delread on startup helps to rid the ramping on longer delay times. There is still some ramping that takes place with shorter delay times but is definitely more acceptable.
Thank you for the solution, Frank!
Okay, so after spending a bit more time with this code I've come to realize that the issue was being caused by extreme low pass filter (smooth) coefficient values that I was using on delread.
I had my smooth coefficient value set at 0.000125 which is roughly .7Hz. I have found that about the lowest I can go without getting ramping, or at least very minimal ramping, seems to be at around 0.0015 which is roughly 7.5Hz.
The pot isn't quite as "analog" as I would like it to be using these values. There is still the clicking when jumping to the next value with some pitch bending, but it is ultimately absent of the zipper noise. I feel that this is probably about the best one could hope for without using an oscillator for clock time.
Sweetalk wrote:Do you guys experiment a high pitch whining with the ramping using this code?, I can't get rid of that!.
The whining noise is due to the lack of interpolation when changing the delay length. The delay length change is being smoothed out, but it is still quantized to integer sample delays.
Sweetalk wrote:Do you guys experiment a high pitch whining with the ramping using this code?, I can't get rid of that!.
The whining noise is due to the lack of interpolation when changing the delay length. The delay length change is being smoothed out, but it is still quantized to integer sample delays.