Phantom POT change triggers
Posted: Wed May 25, 2011 10:24 am
I'm trying to implement a mute for a POT controlled echo to mask the pitch shifted audio while the delay changes but I seem to be getting intermittent, late, changes from the POT triggering the mute at undesireable times.
This is my POT-change-detection code:
The holdoff gets decremented each time the code runs with the following:
I've been using one of the outputs to monitor values (wrax dacr,1) with a storage scope but I'm not seeing any change in value from the POT when the false trigger occurs but my theory is that there is a subtle ripple coming from the POT (harmonic of the POT filter?).
If I expand the mute time long enough the phantom mute trigger is masked but we're trying to keep it as short as possible.
Any suggestions/comments?
Thanks
Bob
This is my POT-change-detection code:
Code: Select all
rdax POT, 1
wrax temp,1
rdax lastPotValue, -1
skp zro, processDelay
; else change detected
clr
rdax temp,1
wrax lastPotValue,0
; then trigger the mute
sof 0, 0.99 ; Reset value for the holdoffCount.
wrax holdoffCount, 1.0
Code: Select all
rdax holdoffCount, 1.0
sof 0.9997, 0 ; sets the rough holdoff window (approx 300ms)
wrax holdoffCount, 1.0 ; Save the scaled version.
sof 1.0, -0.1 ; Offset the value move the holdoffCount
; threshold around. -0.1 yeilds 190ms with 0.9997.
skp neg, unMute
If I expand the mute time long enough the phantom mute trigger is masked but we're trying to keep it as short as possible.
Any suggestions/comments?
Thanks
Bob