ALT PARAMETERS

Algorithm development and general DSP issues

Moderator: frank

Post Reply
Mcfly
Posts: 46
Joined: Fri Mar 08, 2013 2:38 pm
Location: Argentina

ALT PARAMETERS

Post by Mcfly »

Hi folks, is it possible to access pot 1 and pot2 alternative parameters by pressing a momentary switch for more than 3 sec on pot0 input? Any ideas on how to start with some code? Bye bye!
slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

You could use the switch code from my tap tempo program http://www.spinsemi.com/forum/viewtopic ... 2&start=45

If you make the "count" parameter much smaller, you will have to hold the switch down for longer before it changes. The "latch" register in that code changes between 1 and -1 each time the switch is pressed for long enough.
You can then use that to decide which parameters the other two pots control.
If latch is 1 they change 1 set of parameters and if it's -1 they change another.
Mcfly
Posts: 46
Joined: Fri Mar 08, 2013 2:38 pm
Location: Argentina

Post by Mcfly »

slacker wrote:You could use the switch code from my tap tempo program http://www.spinsemi.com/forum/viewtopic ... 2&start=45

If you make the "count" parameter much smaller, you will have to hold the switch down for longer before it changes. The "latch" register in that code changes between 1 and -1 each time the switch is pressed for long enough.
You can then use that to decide which parameters the other two pots control.
If latch is 1 they change 1 set of parameters and if it's -1 they change another.
Well, after a while i've tried this idea and it works, parcially.

The problem is that when the code runs for first time, it seem like the latch change its value to -1 afecting the alt parameters. After the second run, latch remains with the 1 value.

Ive tried something like skp,run for reseting the values in the first run but the latch wins.
:(
slacker
Posts: 116
Joined: Tue Feb 01, 2011 1:13 pm

Post by slacker »

Hi Martin

I did reply to your PM about this but in case you didn't get it for some reason I thought I'd post here as well. If you could send me a copy of your code I'll have a look at it and see if I can make it work.
Post Reply