You are correct, I was using a ramp from my micro controller dac and realized the derp that of course my upward movement is going to not show as much since the ramp is going up :/
Sometimes I wonder how I am even able to do this stuff at all haha
Pot Tracking Speed
Moderator: frank
-
MacroMachines
- Posts: 71
- Joined: Fri Dec 12, 2014 10:45 pm
- Location: Detroit,MI
- Contact:
-
MacroMachines
- Posts: 71
- Joined: Fri Dec 12, 2014 10:45 pm
- Location: Detroit,MI
- Contact:
donstavely wrote:If you want to make the control faster than 4X better, you just need to adjust the filter and gain coefficients.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
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.
I am wondering the nature of the 100ms time constant, is this happening in the hardware? like an analog RC lowpass filter? I just wanted to try and figure it out to see if I can hone in on an optimal coefficient for the highness and also to use in my little modular simulator patch Im making in Audulus3
Yeah, it is a filter in the POT ADC. It was done so the POTs would have stable values even in an environment with vibration (i.e. a stage).
Frank Thomson
Experimental Noize
Experimental Noize
Re:
Sorry for restarting an old thread. I'm a bit unclear about increasing tracking speed beyond the 4x shown in code. Will the cutoff frequency need to be changed or only the shelving- and recursive gain coefficients?donstavely wrote: ↑Thu Aug 05, 2010 12:34 pm 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:
So now when you would have used a "mulx pot0" instruction, you instead use "mulx fastpot". That is all there is to it.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
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
I assume cutoff should be kept as is but I don't have the tools on hand to measure changes to tracking speed.