This is actually for a controller but would work just as well for a skin with two buttons... if only I could make it work!
Any help would be much appreciated!
What I'm trying to do is set up a variable which stores a setting from settings, then changes that setting to something else. It remembers what that setting originally was so that it can be reset later
I am trying to use these commands with ONINIT and ONEXIT but two skin buttons would work the same - which is where I'm testing it mainly (I know this will only work within one session, which is what I want... ONEXIT will always(?) reset it for me)
ONINIT
set "$originalSFQ" setting scratchFilterQuality &
set "$originalFDR" setting filterDefaultResonance &
setting scratchFilterQuality 16 &
setting filterDefaultResonance Strong
ONEXIT
setting scratchFilterQuality "$originalSFQ" &
setting filterDefaultResonance "$originalFDR"
The setting command looks like it can be used both ways (read and write) but if I call var_list the variables are created but are all 0.000
Many thanks,
Alasdair
Any help would be much appreciated!
What I'm trying to do is set up a variable which stores a setting from settings, then changes that setting to something else. It remembers what that setting originally was so that it can be reset later
I am trying to use these commands with ONINIT and ONEXIT but two skin buttons would work the same - which is where I'm testing it mainly (I know this will only work within one session, which is what I want... ONEXIT will always(?) reset it for me)
ONINIT
set "$originalSFQ" setting scratchFilterQuality &
set "$originalFDR" setting filterDefaultResonance &
setting scratchFilterQuality 16 &
setting filterDefaultResonance Strong
ONEXIT
setting scratchFilterQuality "$originalSFQ" &
setting filterDefaultResonance "$originalFDR"
The setting command looks like it can be used both ways (read and write) but if I call var_list the variables are created but are all 0.000
Many thanks,
Alasdair
geposted Fri 03 Feb 17 @ 2:49 pm
You should do it like this:
GET:
setting 'scratchFilterQuality' & param_cast 'integer' & set '$OriFQ' & setting 'filterDefaultResonance' & param_cast 'integer' & set '$OriFDR' & ...
SET:
get_var '$OriFQ' & setting 'scratchFilterQuality' & ...
GET:
setting 'scratchFilterQuality' & param_cast 'integer' & set '$OriFQ' & setting 'filterDefaultResonance' & param_cast 'integer' & set '$OriFDR' & ...
SET:
get_var '$OriFQ' & setting 'scratchFilterQuality' & ...
geposted Fri 03 Feb 17 @ 3:29 pm
I'm still struggling.
Your GET code for 'scratchFilterQuality' works but it won't work for 'filterDefaultResonance' (Which might be because it isn't an integer at a guess)
I had to modify the SET code to:
SET:
get_var '$OriFQ' & param_cast 'integer' & setting 'scratchFilterQuality' & ...
Your GET code for 'scratchFilterQuality' works but it won't work for 'filterDefaultResonance' (Which might be because it isn't an integer at a guess)
I had to modify the SET code to:
SET:
get_var '$OriFQ' & param_cast 'integer' & setting 'scratchFilterQuality' & ...
geposted Fri 03 Feb 17 @ 7:57 pm