IncreaseTrigger and DecreaseTrigger are ignoring Range

Sol_Barnes

Member
Hi.

I seem to be having difficulty with the IncreaseTrigger and DecreaseTrigger commands.
They seem to be ignoring the range given.

I assume I have missed something, so have laid below my script and test case.
Any help very welcome.
Thank you.
Sol


Please see my script here:
_______________________________________

codename "Test Increase/Decrese Range"

DefineMidiTrigger 0xB0, 0x37 // MIDI Cmmand, MIDI Data 1, Trigger Name (optional), MIDI Dev index from 0 to 3 (optional), but default - any
IncreaseTrigger 0,50,"FaderUp" // Min Value, Max Value, Label name
DecreaseTrigger 0,50,"FaderDown" // Min Value, Max Value, Label name
exit

FaderUp:
showhint "Fader Up: Should only show when fader value increases while between 0 and 50"
exit


FaderDown:
showhint "Fader Down: Should only show when fader value decreases while between 0 and 50"
exit

_______________________________________

Test Case:
  • Enter code and update midi address to a free midi fader.
  • Check code is working:
    • With Midi fader at value 0, move fader up a little and see on screen hint "Fader Up:..".
    • Move Midi fader down a little and see on screen hint "Fader Down:.."
  • Next: Move fader to value 127.
    • Move midi fader down a little and see on screen hint "Fader Down:.." (Even though fader is now out of range).
    • Move midi fader up a little.and see on screen hint "Fader Up:.." (Even though fader is now out of range).

Expected Behavior:
I would expect this script to only respond when the midi slider is the the range of 0 to 50.

Current Behavior
Any increase of decrease in the midi value will engage the 'DecreaseTrigger' / 'IncreaseTrigger' command. Regardless of value range. Looks as though these commands are ignoring the range.
 
Command IncreaseTrigger create a reaction when new value is more than current.
It only changes to compared to the current state.

Maybe its easier to use "inrangetrigger"

Here four scripts you probably will like:

Code:
InRangeTrigger MinValue, MaxValue, LabelName

Function:
The action will be activated when values comes in range between MinValue and MaxValue. When it happen the scripter does goto to LabelName

Values:
- MinValue
- number, a minimum value of the range
- MaxValue - number, a maximum value of the range
- LabelName - string that contain label name

Code:
InRangeTriggerCmd MinValue, MaxValue, Command

Function:
The action will be activated when values comes in range between MinValue and MaxValue. When it happen the scripter execute Command.

Values:
- MinValue - number, a minimum value of the range
- MaxValue - number, a maximum value of the range
- Command - string that contain a PangoScript command

Code:
 OutOfRangeTrigger MinValue, MaxValue, LabelName

Function:
The action will be activated when values comes out of range of MinValue and MaxValue. When it happen the scripter does goto to LabelName.

Values:

MinValue - number, a minimum value of the range
MaxValue - number, a maximum value of the range
LabelName - string that contain label name

Code:
 OutOfRangeTriggerCmd MinValue, MaxValue, Command

Function:
The action will be activated when values goes out of range of MinValue and MaxValue. When it happen the scripter execute Command.

Values:

MinValue - number, a minimum value of the range
MaxValue - number, a maximum value of the range
Command- string that contain a PangoScript command
 
Hi Bob,

So you are saying that the range values for decrease and increase triggers, don't actually do anything?

IncreaseTrigger 0,50,"FaderUp" // Min Value, Max Value, Label name
DecreaseTrigger 0,50,"FaderDown" // Min Value, Max Value, Label name


InRangeTrigger won't work for my case as I need to have an action happen whenever the value changes.

So what I am trying to do is set a 'dead' space in the middle of my animation speed midi fader that is = to 100%.
This is to get around the fact that my midi fader does not have a notch position in the middle so is very hard to set the animation speed back to 100% (I have to use reset button to set the animation speed to 100%, but then the fader is out of position).
The idea is to create about 10mm space on the fader that is always 100% or normal playback speed, so it is easy to set the slider back to a neutral position.


So I was looking at codes something like this:

InRangeTrigger 40, 80, "Set_Animation_Speed_100"

IncreaseTrigger 0,40 "Adjust_Animation_Speed"
IncreaseTrigger 80,127 "Adjust_Animation_Speed"

DecreaseTrigger 0,40 "Adjust_Animation_Speed"
DecreaseTrigger 80,127 "Adjust_Animation_Speed"


Adjust_Animation_Speed: Code to set animation speed to 100%

Adjust_Animation_Speed: Code to set animation speed based on DMX value.


Testing
Using the above method, it all works, but for the Increase and Decrease Triggers ignore the ranges given.

If this is by design, is there another method that I could use?

I tried using a combination of 'if statements' and 'triggers' to track the position. And I was able to create the slider with the exact behavior described, but it only worked if I moved the fader very slowly.

Many Thanks
Sol Barnes
 
PS.

If not the workaround I think is to use 2 faders,
Fader 1: 100% to ~300%
Fader 2: 0% to 100%

Not ideal will work.
 
Back
Top