Frank's delay time pot smoothing technique

Algorithm development and general DSP issues

Moderator: frank

Post Reply
Aaron
Posts: 46
Joined: Wed Mar 04, 2015 7:10 pm
Location: Oklahoma

Frank's delay time pot smoothing technique

Post by Aaron » Wed May 06, 2015 3:43 pm

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

frank
Posts: 991
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank » Wed May 06, 2015 4:03 pm

Off the top of my head I would try initializing potfil to the pot value at start up.
Frank Thomson
Experimental Noize

Aaron
Posts: 46
Joined: Wed Mar 04, 2015 7:10 pm
Location: Oklahoma

Post by Aaron » Thu May 07, 2015 7:59 am

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.

frank
Posts: 991
Joined: Wed Oct 19, 2005 12:26 pm
Contact:

Post by frank » Thu May 07, 2015 3:08 pm

Hmmm, I thought setting pot1fil would work. Can you post or email me your code?
Frank Thomson
Experimental Noize

Aaron
Posts: 46
Joined: Wed Mar 04, 2015 7:10 pm
Location: Oklahoma

Post by Aaron » Fri May 08, 2015 10:11 am

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!

Aaron
Posts: 46
Joined: Wed Mar 04, 2015 7:10 pm
Location: Oklahoma

Post by Aaron » Mon May 11, 2015 1:03 pm

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.

Sandrine
Posts: 16
Joined: Thu Mar 12, 2015 10:19 am
Location: BC Canada
Contact:

Post by Sandrine » Mon Jun 08, 2015 10:48 am

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
Is there a latin word for "Stage Fright"?

Sweetalk
Posts: 96
Joined: Thu Oct 15, 2009 5:13 am

Post by Sweetalk » Wed Aug 03, 2016 7:10 am

Do you guys experiment a high pitch whining with the ramping using this code?, I can't get rid of that!.

seancostello
Posts: 74
Joined: Mon Sep 11, 2006 10:04 pm

Post by seancostello » Thu Aug 11, 2016 10:43 pm

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

Sweetalk
Posts: 96
Joined: Thu Oct 15, 2009 5:13 am

Post by Sweetalk » Fri Aug 12, 2016 7:37 am

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!

Post Reply