Adding buttons to control stepper motor speed.

I need help in either:

Adding a switch (or switches) to trigger a change in the step speed in my sketch (slow/med/fast) where i can reference that step speed visually (either with a 3 way switch where each position of the switch defines a specific step speed or 3 switches where, depending on which switch is pressed, that step speed is used.

Or

Another solution (and probably easier/more user friendly) would be to use a rotary pot to control the speed, thus negating the need for multiple switches (less real estate on the hand controller also).

I thinking the pot would be the better option.

I just need to know the code to use a pot to control the speed and where to add it into my sketch. I'm guessing i would replace the code I already have for the joystick button with the pot code.

Lastly, any code to help me change from the joystick to buttons for forward/revers and I can build a 2nd hand controller & compare.

I've read through the tutorials on the stepper & accelstepper & the libraries but can only find info on either moving a stepper x distance or have it continually run and then a button to stop it, whereas I'm trying to jog.

Again, any advice/help is greatly appreciated Paul. Thanks again for your time.