Make Your Own Hardware Sliders to Control Individual Process Volume
Turn an old shoebox into a DJ-like controller that lets you adjust the volume of any programs running on a Windows PC with hardware sliders.
Modern computers are multitasking machines, which means you’ve probably got a variety of programs and websites running on your computer at any given time. It’s unlikely that you want all of those to pump out audio at the same volume level. You may, for instance, want Spotify to play loudly while your web browser is quiet or completely muted. Windows 10 has built-in features to let you control the volume of different application processes individually, but that requires poking around through menus. You can instead create your own hardware volume sliders that connect to your PC.
After constructing this device, you’ll be able to control the volume of any programs running on a Windows PC using hardware sliders like a bona fide DJ. Unfortunately Linux and macOS handle processes differently, so the code for this device won’t work on those operating systems as it is — though it may be possible to modify the Python script and program your own OS-specific replacement for the VBScript used here. You can use as many volume sliders as you like, up to the amount of analog pins you have available. Those can then each be attached to whatever specific programs you want volume control for.
To build this device, you’ll just need an Arduino board (an Uno should do the trick) and however many volume sliders you want. Those sliders are linear potentiometers, which means you can use more conventional rotary potentiometers if you want dials instead of sliders. All you have to do is connect those to your Arduino’s power and ground, and then the outputs to the Arduino’s analog pins. Then you can flash the provided Arduino code to read them. That will send the sliders’ positions to your computer through the serial connection. A Python script monitors those position values and then sets the corresponding programs’ volume levels. The VBScript is just there to keep the Python script running in the background, instead of as an open Python window. You can then control any process’s volume without having to click on anything!