btw. this would also be the solution to simulate a “split” rotary encoder on an MIDI device. There are devices (MIDI Fighter Twister) where this can be set up as the default, and the encoder always only sends the velocities 63 - 64 - 65.
Those encoders don’t turn round&round, but instead only go one click to the left or right and then repeat the assigned action until put back into the center position. In real life they are usually spring loaded I guess.
In this example I am moving the heading bug. The scripts include controller acceleration, so the movement will get faster, the longer you keep the encoder left or right of the center. The movement stops when you move the encoder to the center position.
And here is the code - the script group and name must be exactly like in the screenshots or it won’t work. (Changing the group or script name changes the name of the script variable)
Base script:
(L:RotaryInput-HeadingBug)·0·==·(L:RotaryInput-HeadingBug)·64·==·or·if{·0·(>L:HdgBugCnt)·1·(>L:HdgBugRep)·}
Automated script
(L:RotaryInput-HeadingBug)·64·<·if{·1·(>K:HEADING_BUG_DEC|(L:HdgBugRep))·(L:HdgBugCnt)·++·(>L:HdgBugCnt)·}·(L:RotaryInput-HeadingBug)·64·>·if{·1·(>K:HEADING_BUG_INC|(L:HdgBugRep))·(L:HdgBugCnt)·++·(>L:HdgBugCnt)·}·(L:HdgBugCnt)·8·==·if{·2·(>L:HdgBugRep)·}·(L:HdgBugCnt)·16·==·if{·4·(>L:HdgBugRep)·}