finetuner toggle switch macro

fanboi

2008-08-04 04:19:09

yo. so i made this little finetuner script here so that when i hold down a momentary toggle button on my controller, it will send out pp/4, which is what i am looking for. i have it set up so that when i hit the trigger button it will activate the twiddler preset (as i call it :p), and otherwise have it deactivated.

now, all this is fine, but theres a catch: right now, it just sends out 1/4 of my cc values meaning that whenever i hit the trigger button it will jump from say value 112 to 28. hardly ideal behaviour.

so what i want is a way to know what cc my controller was currently at, then when i hit the trigger it will continue from this point upwards/downwards with the pp/4 rules, then when i release the trigger go back to normal behaviour.

basicly this will be a finetuner, so when i hit the trigger i will be able to make small adjustments, and when its not triggered big (or normal, if you wish).

with that said, heres my setup:

Code: Select all

--------------- Preset _Activate_Twiddler;

Translator 1: active
Options: stop=false
Incoming: MIDI B0 02 7F 
Outgoing: activate preset "_Twiddler;"

Translator 2: active
Options: stop=false
Incoming: MIDI B0 02 7F 
Outgoing: deactivate preset "_Tweak;"

Code: Select all

--------------- Preset _Twiddler;

Translator 1: tweak test 1
Options: stop=false
Incoming: MIDI B0 2B pp 
Rules: 
  pp=pp/4
Outgoing: MIDI B0 2B pp 

Code: Select all

--------------- Preset _Deactivate_Twiddler;

Translator 1: deactivate
Options: stop=false
Incoming: MIDI B0 02 00 
Outgoing: activate preset "_Tweak;"

Translator 2: deactivate
Options: stop=false
Incoming: MIDI B0 02 00 
Outgoing: deactivate preset "_Twiddler;"
also, since im pretty new to this im not sure if this is the easiest way of doing this either, so yeah please.. bare with me eh? :)

edit: btw, the _Tweak preset is currently empty (or rather, its just a throughput) so theres no need to include it in the setup i guess.

joesapo

2008-08-18 23:34:44

fanboi wrote:so what i want is a way to know what cc my controller was currently at, then when i hit the trigger it will continue from this point upwards/downwards with the pp/4 rules, then when i release the trigger go back to normal behaviour.
Using a global variable is going to be the only way of keeping track of a controller value and passing it between two different translators. I'm assuming you're trying to set this up using a potentiometer-style knob, not an endless-encoder?

I think I know what you're trying to do here, and I'm sure it can be done, but there are a couple of limitations involved with using potentiometers and trying to have values 'jump' along with them. Your best bet is to try to convert your pot into an endless encoder, and then use the +1/-1 values to alter your global variable. The down-side of this, is that when you go back into 'full' mode on your knob, it's going to want to jump values again unless you use a whole lot of rules and code to smooth the knob out a bit.

I'd be more than happy to help you with this if you'd like. Please let me know and I can go into more detail if required.

Joe

fanboi

2008-08-19 16:19:33

joesapo wrote:
fanboi wrote:so what i want is a way to know what cc my controller was currently at, then when i hit the trigger it will continue from this point upwards/downwards with the pp/4 rules, then when i release the trigger go back to normal behaviour.
Using a global variable is going to be the only way of keeping track of a controller value and passing it between two different translators. I'm assuming you're trying to set this up using a potentiometer-style knob, not an endless-encoder?

I think I know what you're trying to do here, and I'm sure it can be done, but there are a couple of limitations involved with using potentiometers and trying to have values 'jump' along with them. Your best bet is to try to convert your pot into an endless encoder, and then use the +1/-1 values to alter your global variable. The down-side of this, is that when you go back into 'full' mode on your knob, it's going to want to jump values again unless you use a whole lot of rules and code to smooth the knob out a bit.

I'd be more than happy to help you with this if you'd like. Please let me know and I can go into more detail if required.

Joe
i dont want the values to jump though. i want to use a regular style pot (only got two encoders, and theyre both very very busy heh), and i want to trigger a momentary switch to alter the resolution so to speak, so instead of moving say 10 cc values when moved an inch, it will only move 2 cc values, and when released go back into its normal mode, continuing from where it was finetuning.

not sure if thats a good explanation, but thats really the only explanation i can give ;)

i figured i had to somehow store the values, but im clueless to how really.