For the random script you could use HandyControl and load one of the baseline scripts which you can find in the same download folder. If you add jitter you have a random script.
The app supports a gamepad so you can use the buttons to set different speeds or use the trigger.
The edging part is also possible if you load a random script and lower the speed. This script will serve as a fallback while you use the buttons and triggers to control the speed. If you are close to the edge you can switch to a slower button or fall back to the script or if you go over the edge you can have the slow script do the rest.
I bind my keys 1,2,3,4 on my keyboard (numpad) to certain ‘difficulties’.
Pressing 1 would make this script or software randomly chose between certain pre-recorded rhytms within the ‘1’ column (easy).
Pressing 4 would make the script or software randomly chose between other pre-recorded rhytms within the ‘4’ column (hard)
Sounds that you have some of the same ideas than me.
Thats definite on my todo list but this needs a lot of coding and currently I have not deciced yet how I want to implement this. Either as a script database which contains raw data that are cut/exported from scripts or as mini scripts in a folder.