Page 1 of 2

Pot Tracking Speed

Posted: Fri Jun 13, 2008 9:39 pm
by elmood
So far I'm loving the FV-1 and working on several designs with it! But one thing that bugs me is that the pot inputs feel sluggish. It doesn't seem to track the turning of the physical pot and sort of plays catch up when you stop turning. I often find that once things settle down I've actually over-adjusted the control.

I'm hoping to use this part as the master section of a guitar amplifier. But it will be weird if some of my controls (the analog ones) operate normally, and some (the FV-1 ones) operate with the strange lag. Is there any way to adjust this?

I understand that the inputs are smoothed, but it feels excessive. It's really the only thing that bugs me. :) Oh, and not having a few general I/O pins, but that might be feature creep. :)

Posted: Fri Jun 13, 2008 10:38 pm
by frank
The pot inputs have a bit of hysteresis and there is about a 100mS time constant due to the design. There really isn't anything that can be done from software except to not add any smoothing in your program.

Posted: Thu Aug 05, 2010 12:34 pm
by donstavely
I have been thinking about this issue for awhile, and I think I have a slick and simple solution to the pot speed issue. This should make a pot input usable for an expression pedal, for example.

All that is needed is to counteract the action of the slow lowpass filter on the pot with a shelving highpass filter in the code. You place the highpass corner frequency such that it cancels the pot lowpass corner frequency, extending the response of the pot. Then the shelving corner frequency rolls it back off at a higher frequency (say 4X higher), thereby preserving most of the noise filtering. Since the shelving filter speeds up but attenuates the control signal, we need to gain it up again. It costs five instructions in all:

Code: Select all

equ   potfilt   reg0
equ   fastpot reg1   

rdax	pot0, 1
rdfx	potfilt, 0.001    ; this is the shelving highpass filter
wrhx	potfilt, -0.75    ; it cuts lower freqs by factor of 4
rdax	fastpot, 0.75     ; this gives 4X recursive gain
wrax	fastpot, 1        ; to recover full range
So now when you would have used a "mulx pot0" instruction, you instead use "mulx fastpot". That is all there is to it.

If you want to make the control faster than 4X better, you just need to adjust the filter and gain coefficients.

I tested the algorithm by injecting a 1Hz square wave into the pot input to simulate instantaneous changes to the control. The normal pot output has a long (100ms) time constant. The fast control output is indeed 4X faster, and is still clean and filtered. I have a scope picture, but I can't directly attach it.

This should be much more usable with a expression pedal, without compromising the noise filtering too much.

Don

Posted: Tue Aug 10, 2010 10:22 am
by donstavely
So Frank, I thought you would be pretty interested in this, since people (including me) have complained about the pot lag for a long time. It might be good for others to hear that this idea makes some sense.

BTW, I hope people are still interested in the FV-1. There hasn't been much activity on the forum lately.

Posted: Tue Aug 10, 2010 2:32 pm
by frank
Actually I'm very interested but as you did a great job with the shelving filter approach (which never even occurred to me to try) I didn't really have anything of value to add.

Forum activity...not much lately.

Email activity from people doing commercial design so they don't want to post in the forum...all I can say is watch the next few trade shows (including the small local ones) and play "what has an FV-1 in it", it may surprise you what is being done with it.

Posted: Tue Aug 10, 2010 7:47 pm
by donstavely
It is really great to hear that there are some commercial customers that you are working with. To be honest, I was getting a little worried that the FV-1 might not reach the "critical mass" needed for long-term support and future development.

I saw what happened to the Line6/Freescale pedal - great idea, sketchy tools, very hard to program, no support. Now an orphan product. I almost bit, before finding the FV-1.

Tell those big guys that they can use my fast pot idea - no charge. Seriously, it would be great if commercial developers participated in the forum. They can share too, without giving away their crown jewels.

Posted: Tue Aug 10, 2010 11:41 pm
by frank
There's already a lot of stuff shipping with the FV-1, a good portion is consumer so the pro audio community simply doesn't see it. And the companies (consumer and pro audio) ask that I not reveal who they are.

Posted: Sun Aug 28, 2011 2:18 pm
by seancostello
donstavely wrote:I have been thinking about this issue for awhile, and I think I have a slick and simple solution to the pot speed issue. This should make a pot input usable for an expression pedal, for example.

All that is needed is to counteract the action of the slow lowpass filter on the pot with a shelving highpass filter in the code. You place the highpass corner frequency such that it cancels the pot lowpass corner frequency, extending the response of the pot. Then the shelving corner frequency rolls it back off at a higher frequency (say 4X higher), thereby preserving most of the noise filtering. Since the shelving filter speeds up but attenuates the control signal, we need to gain it up again. It costs five instructions in all:

Code: Select all

equ   potfilt   reg0
equ   fastpot reg1   

rdax	pot0, 1
rdfx	potfilt, 0.001    ; this is the shelving highpass filter
wrhx	potfilt, -0.75    ; it cuts lower freqs by factor of 4
rdax	fastpot, 0.75     ; this gives 4X recursive gain
wrax	fastpot, 1        ; to recover full range
So now when you would have used a "mulx pot0" instruction, you instead use "mulx fastpot". That is all there is to it.

If you want to make the control faster than 4X better, you just need to adjust the filter and gain coefficients.

I tested the algorithm by injecting a 1Hz square wave into the pot input to simulate instantaneous changes to the control. The normal pot output has a long (100ms) time constant. The fast control output is indeed 4X faster, and is still clean and filtered. I have a scope picture, but I can't directly attach it.

This should be much more usable with a expression pedal, without compromising the noise filtering too much.

Don
This is a GREAT idea. I plan on doing some development for the TipTop Audio Z-DSP unit soon, and this would allow for the control voltages to be usable for faster LFO signals. I was thinking along the lines of pure differentiation, but your shelving filter is a much better idea.

Sean Costello

Posted: Sat Sep 10, 2011 4:17 pm
by donstavely
Thanks, Sean.

I am thinking that this method should work fine, even with the variable speed clock of the Z-DSP. Since the built-in lowpass filters on the pots are implemented digitally, they should track exactly with the compensation filter code. So the code I posted should work regardless of clock frequency.

But keep in mind that the pot lag will still vary with clock frequency, with or without this code. The lag will just be 4X faster with the code. This makes sense, right?

Don

Posted: Sat Sep 10, 2011 6:53 pm
by seancostello
donstavely wrote:Thanks, Sean.

I am thinking that this method should work fine, even with the variable speed clock of the Z-DSP. Since the built-in lowpass filters on the pots are implemented digitally, they should track exactly with the compensation filter code. So the code I posted should work regardless of clock frequency.

But keep in mind that the pot lag will still vary with clock frequency, with or without this code. The lag will just be 4X faster with the code. This makes sense, right?
Totally. I don't think that trying for a specific time constant is realistic. Just getting faster than the existing lag should be good enough, while still retaining some smoothing.

Posted: Mon Sep 24, 2012 12:15 am
by Alex MAK
Hey, guys! Is it possible to use a similar approach to reduce the delay to pitch shifter?

Posted: Mon Sep 24, 2012 8:31 pm
by frank
Alex MAK wrote:Hey, guys! Is it possible to use a similar approach to reduce the delay to pitch shifter?
No, the delay in the pitch transpose is due to the buffering required.

Posted: Tue Sep 25, 2012 5:53 am
by Sweetalk
Great idea Don!!, I'll try it soon and post the results. It's a clever and simple solution.

Posted: Fri Jul 08, 2016 11:31 pm
by MacroMachines
It seems like this works well on the upward movement, but the downward movement is still showing the hysteresis. I was trying out having a micro controller and dac to use for controlling the pot inputs, so any improvement is good, Ill try playing with your numbers some more and see if I can get it as fast as possible, or maybe I should use a second order highpass by duplicating the filter code? I also noticed when I scoped the pots without this HP filter code it wouldn't make it anywhere near the top or bottom, and now its showing a far larger range.

Posted: Sun Jul 10, 2016 6:18 am
by Digital Larry
Move the pot slowly to make sure it isn't clipping going up. "Theoretically" an RDFX filter (or any filter working linearly), the rise/fall time should be the same.