billv wrote:Getting rid of "false triggers".
Getting the "exactly 100 triggers" would be very tricky - it's not a problem with the trigger system at, it's because of the way that the OS deals with the mouse. The mouse driver will only report the position to FS (via Windoze) at a set rate.
As an example with easy, made up numbers, let's say that...
- Mouse sensitivity: 1px = output changes by 1.
- Windows reports the mouse position to FS: 20 messages per second (fixed by the mouse driver)
- Knob movement: You go the full 0-100 in exactly one second.
In this case, there are 20 new mouse positions reported by Windows over the 1 sec of movement, so, on average, each new position has moved by 5 pixels; and the output changes by roughly 5 for every trigger.
That's one of the reasons why hardcore gamers pay a fortune for expensive mice with custom drivers - to get a higher polling rate for the mouse to match the super-high fps of their fancy graphics card, for more responsive and accurate mutant-alien-zombie-nazi targetting!
To get exactly 100 triggers, you'd have to 'interpolate' the mouse values, sliding up or down to the new value whenever it changed by more than one 'step' - a green/Ruby de-zipper, in effect.
But that brings its own problems...
How fast do you slide? Impossible to say because the mouse is operated by an unpredictable human - what if the next mouse message shows that they slowed right down, or decided to change direction? Slide too slowly and the user will get frustrated by the 'lag' - too quickly, and the effect is not much different than just using a regular de-zipper - plus of course the extra CPU load of the 'slider' module (which would have to be timer based).
If you need every 'in-between' value to be output because you're testing for special values, then it's usually easier to refactor the code that does the testing - i.e. test that the previous value was one side of the threshold, and the new value is the other side, so that hitting the exact number doesn't matter (that's how the 'MIDI Catchup' works in my schematic).