Page 1 of 1

Frank's delay time pot smoothing technique

Posted: Wed May 06, 2015 3:43 pm
by Aaron
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.

Code: Select all

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

Posted: Wed May 06, 2015 4:03 pm
by frank
Off the top of my head I would try initializing potfil to the pot value at start up.

Posted: Thu May 07, 2015 7:59 am
by Aaron
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.

Posted: Thu May 07, 2015 3:08 pm
by frank
Hmmm, I thought setting pot1fil would work. Can you post or email me your code?

Posted: Fri May 08, 2015 10:11 am
by Aaron

Code: Select all

skp	run,START
wlds	sin0,100,818
ldax	pot1
wrax	pot1fil,0
or	length*256
mulx	pot1fil
wrax	delread,0
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!

Posted: Mon May 11, 2015 1:03 pm
by Aaron
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.

Posted: Mon Jun 08, 2015 10:48 am
by Sandrine
Why not just mute the DACs after startup, then skip after the LPF has stabilized? I've done that with other audio designs, simple, effective

Posted: Wed Aug 03, 2016 7:10 am
by Sweetalk
Do you guys experiment a high pitch whining with the ramping using this code?, I can't get rid of that!.

Posted: Thu Aug 11, 2016 10:43 pm
by seancostello
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.

Sean Costello

Posted: Fri Aug 12, 2016 7:37 am
by Sweetalk
seancostello wrote:
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.

Sean Costello
OK!, seems logical, thaks!