Sometimes too loud, sometimes too quiet
I was streaming again, casually talking to myself with the game audio and music playing in the background. At some point, a viewer wandered into my stream and kindly informed me that my music was too loud and the game was too quiet. In my headphones, it was more the other way around, but it was fine for me. So, I had to open OBS and fiddle with the individual sources. After a few attempts, the volume in the stream was mixed correctly.
On my end, the game was at full volume, the music in the music app was set to 10%, and my headphone volume was at 15%. In OBS, my microphone was at 100%, the game at 80%, and the music at 70%. At least in the Windows volume mixer, everything was at 100%. But it probably becomes clear quickly that there are many places to adjust program volumes, and a change in one place can lead to unwanted effects elsewhere. And is everyone even hearing the same thing?
Centralized volume control
Microsoft probably recognized this dilemma at some point and implemented a volume mixer in the system with Windows 10. It allows you to control not only the volume of input and output devices but also the volume of all programs. A good idea, in theory. Only one thing isn’t well-resolved: accessibility.
In Windows 11, there are two volume mixers that are accessible in different ways. I can click on the speaker icon in the system tray next to the clock, then click the volume mixer icon next to the volume slider, and then scroll down. At the top are all the audio devices, six in my case. Then comes the setting for spatial sound, and only then do the programs follow. The second option is to right-click the speaker icon and select “Open volume mixer.” This opens the volume mixer in the system settings. It’s much clearer, but it’s another new window and not exactly a quick setting.
Microsoft should definitely think about accessibility here. I would like it if a left-click on the speaker icon not only allowed adjusting the master volume but also showed all programs that currently have active audio output. Or at least the currently focused program. But unfortunately, that’s not the case. Still, I like the idea of controlling the volume of all programs centrally.
Controlling the volume mixer with hardware
So, Windows has the ability to control the volume of each program individually. And as I had to learn the hard way with the Tidal application, programs can also use and adjust this setting. My Stream Deck could do it too. But I still have the first version without rotary knobs. Controlling the volume of programs with buttons, especially the rather mushy buttons of the Stream Deck, is not much fun. I had it set up, but I never actually used it.
While browsing through Printables, a site for 3D printing models, I stumbled upon a hardware volume mixer. At least the case for it, and a reference to a project called Deej. Deej consists of both software for Windows and firmware for Arduino boards. As a DIY pro (ahem), I was immediately fired up. The project suggests using sliders. That’s too bulky for me, which is why I preferred rotary knobs.
A quick look on Amazon showed that the parts aren’t that expensive. A 5-pack of Arduino Nanos is around 20 euros, and 10-packs of rotary potentiometers are practically given away for 10 euros. But I only needed one Arduino Nano and 5 rotary potentiometers, so I ordered the right amount, plus five meters of connecting wire, for under 6 euros on AliExpress. In hindsight, I could have just bought them on Amazon. I have a feeling I’ll be tinkering more often.
Building and setting up Deej
The parts arrived surprisingly quickly from China with free shipping. I got out my cheap soldering iron and just started soldering away. In the end, the wiring isn’t that difficult, as the rotary potentiometers only have three connections: GND, 5V, and the actual signal. The GNDs are connected together to the GND pin of the Arduino, and all the 5Vs to the 5V pin. Only the signal wires are soldered separately to the analog pins. I took the “solder them all to the pin” part very literally, and my final result probably makes some people twitch.
But whatever, it works. Well, I have to make sure the connections don’t touch. I found that out when the contraption was lying wildly on the table, I plugged it in, and suddenly a bit of smoke appeared. Luckily, not much current flows through an Arduino.
But hardware without software is of little use. I downloaded the Arduino IDE, set up the Arduino, and uploaded the code from the project page onto it. A quick adjustment to the configuration and starting the software, and it should be ready to go. I eagerly turned the knobs and… nothing happened. The troubleshooting began. The debug software, which the project also offers, showed no reaction. In the Arduino software, I then monitored the data stream. It made no sense at all and didn’t react to turning the potentiometers.
Next guess: I was too stupid to solder after all. So I rummaged through my box and got out the multimeter. I quickly checked all the connections. Looks good. There’s contact everywhere, and the cables are connected correctly. What is it then? Then my gaze fell back to the Arduino IDE. It was still showing an active data stream, even though the Arduino wasn’t even connected. Slowly, my eyes wandered to the MyGamepad. Display off, no reaction to input, dead…
Well, the IDE had apparently detected both connected Arduinos. The ESP32 on COMM5 from the MyGamepad and the Nano 328P from the audio mixer on COMM4. Of course, I had selected the ESP32 and flashed the code onto the MyGamepad instead of the audio mixer. So, first, I had to flash the correct code back onto the ESP32 with the flashing tools, then the Deej code onto the Nano, and lo and behold. The Deej software reacts to turning the potentiometers, and the data stream looks good. Only the direction isn’t right yet, and quieter/louder are swapped. But that can be easily adjusted in the Deej configuration.
Conclusion on the Deej Audio Mixer
The audio mixer is now stuck to the underside of my desk edge, making it quickly accessible. Even though the project is rather simple from an electronics standpoint, I learned a lot. I’m sometimes a bit hasty and unfocused. In the future, I should think about what I want to do beforehand and be more deliberate while doing it. For the first two days, I was a bit disappointed because the audio mixer reacted very coarsely and was difficult to fine-tune. Then it occurred to me: I had reduced the polling rate to one query per second during troubleshooting and never changed it back. The audio mixer was correspondingly sluggish. That was quickly fixed, but it shows once again how organized my approach is.
But now the audio mixer is running as desired, and I’m able to control five audio tracks separately. I currently have the audio mixer configured as follows: master volume, music, games, active application, and all unassigned programs. Thanks to the simple configuration via a YAML file, I can adjust this anytime and quickly. I now have five potentiometers connected and noticed that the Arduino offers eight analog inputs. There’s actually room for three more potentiometers…