Menu

Whereupon a Tape Deck leads to a VolumeSlapper feature

April 22, 2017 - .NET, C#

I wrote about a program that allows setting Application Volume on the Command line in my Slapping the Windows Master Volume as well as my Retrieving and Setting Individual Program Volume posts. It is a utility to manipulate Windows Session Audio via the command line.

As it happens, I’ve taken a slight interest in older hi-fi equipment. As a result I picked up a Denon DR-M07 Tape Deck- as well as three of the higher-end Metal audio cassettes for recording. I’ve found it to be very interesting. One aspect of the setup is that I have it routed to my PC. The Tape Deck playback output is connected via RCA cables to my Sound Card’s Daughterboard AUX RCA inputs. The Recording input is connected to the smaller Headphone connector that is on the “breakout” module, so I can record audio that is playing.

Now, this is obviously Audio related, but where does the Volume Slapper program fit in here? Well to Record, I must turn down the volume of all programs I do not want to record (for example, System sounds, Skype notifications, sound in Web browsers) and switch the sound card to Headphone mode. I also need to disable the Aux Input, as it causes feedback (the tape deck outputs a low level signal of it’s own as well when recording). Now, for the most part these are pretty simple to do but adjusting audio levels is slightly annoying to do- especially if their current levels were carefully crafted over a period of time to suit what I was doing. My thinking towards Volume Slapper was to make it easy to restore the Audio levels I was using before I had a “recording session”. Disabling sound devices and flipping hardware relays (the headphone setting of the card) are outside the scope of the program IMO.

it also seems more widely applicable. It could be useful to save the volume settings of active programs so you can restore them later for a number of reasons. Maybe you achieved a perfect balance between your browser being used for video playback on one monitor and the audio of your game being played on your other screen, for example.

Now that that is out of the way, the actual implementation is actually quite simple. We just need to handle the new save and load features, obviously. In order to simplify my own usage I had it default to a “quick.xml” file saved to appdata if a file isn’t specified. The file itself- as indicated by the filename, is an XML file. it is built using the standard XElement capabilities of the .NET Framework. Since the usage is so simple here I didn’t reference Elementizer. it just saves the session names and the volume to the XML file, or loads them from an XML file. Of course since the sessions can be different between saving and loading, it currently ignores new sessions or sessions that didn’t exist when the data was saved. Saving the volume, starting word, and loading the volume file that was created won’t affect Word’s audio volume, for example.

VolumeSlapper, including these recent modifications, can be found on github.

As an interesting aside I’ve started working on a sort of silly “task” project which basically acts as a strict task scheduler that runs precisely and shows the time before each task is going to be run next.

Have something to say about this post? Comment!