You may be able to do that with Arduino or Raspberry Pi Pico (or any Raspberry Pi) and neopixels (which I think are strips of Led lights and a potentiometer so when that is turned the number of LEDs that come on is bound to the position of the potentiometer (POT.
Pots can be either rotary or linear I think in terms of their physical appearance.
Cool, no problem.
@zleap Thank you! I agree that's likely a strong direction. I'm just trying to explore something in software quickly to "see if it's not stupid" and then, as you suggest, make it much more physical.