Soundcard volume and settings: changing them via hotkey

C

Chris Mallett

A while back, I searched high & low for some freeware which would allow
complete control over any soundcard without having to open its mixer window.
Not having found anything flexible enough, I decided to write my own and
integrate it into AutoHotkey, which is free and open source. Here are some
examples of what you can do with it:

SoundSet, 50 ; Set the master volume to 50%
SoundSet, 1, Microphone, mute ; mute the microphone
SoundSet, +1, , mute ; Toggle the master mute (set it to the opposite
state)
SoundSet, +20, Master, bass ; Increase bass level by 20%.
if ErrorLevel <> 0
MsgBox, The BASS setting is not supported for MASTER.

SoundGet, master_volume
MsgBox, Master volume is %master_volume% percent.

SoundGet, master_mute, , mute ; It will be either ON or OFF
MsgBox, Master Mute is currently %master_mute%.

All of the above examples can easily be assigned to a hotkey such as in this
example, which toggles the master mute whenever you press Ctrl-Alt-M:
^!m::SoundSet, +1, , mute


I've also made some other recent improvements to AutoHotkey that may be of
interest:
- Added the ability to connect to a remote computer's registry, as well as
registry enumeration (allows the registry to be explored programmatically).

- Added built-in variable %A_TimeIdle%, which is the number of milliseconds
since the system last received keyboard, mouse, or other input. This is
useful for determining whether the user is away. This variable will be blank
unless the operating system is Windows 2000, XP, or beyond.

http://www.autohotkey.com
 
W

Wayne D

A while back, I searched high & low for some freeware which would allow
complete control over any soundcard without having to open its mixer window.
Not having found anything flexible enough, I decided to write my own and
integrate it into AutoHotkey, which is free and open source. Here are some
examples of what you can do with it:

SoundSet, 50 ; Set the master volume to 50%
SoundSet, 1, Microphone, mute ; mute the microphone
SoundSet, +1, , mute ; Toggle the master mute (set it to the opposite
state)
SoundSet, +20, Master, bass ; Increase bass level by 20%.
if ErrorLevel <> 0
MsgBox, The BASS setting is not supported for MASTER.

SoundGet, master_volume
MsgBox, Master volume is %master_volume% percent.

SoundGet, master_mute, , mute ; It will be either ON or OFF
MsgBox, Master Mute is currently %master_mute%.

All of the above examples can easily be assigned to a hotkey such as in this
example, which toggles the master mute whenever you press Ctrl-Alt-M:
^!m::SoundSet, +1, , mute


I've also made some other recent improvements to AutoHotkey that may be of
interest:
- Added the ability to connect to a remote computer's registry, as well as
registry enumeration (allows the registry to be explored programmatically).

- Added built-in variable %A_TimeIdle%, which is the number of milliseconds
since the system last received keyboard, mouse, or other input. This is
useful for determining whether the user is away. This variable will be blank
unless the operating system is Windows 2000, XP, or beyond.

http://www.autohotkey.com
Did you try QuickMix?

For Windows 9x/NT/Me/2000/XP

What is QuickMix?

"Are you fed up with carefully setting the audio mixer on your Windows
computer only to have the settings changed by another application or when
you reboot?
Do you need to store and recall different sets of mixer settings quickly
and easily?

Then QuickMix is for you.

QuickMix is a simple applet that allows you to store all or part of the
current state of your audio mixer in a settings file, and to restore the
mixer to that state whenever you want. "

http://www.ptpart.co.uk/quickmix/

Regards

Wayne D
 
C

Chris Mallett

Wayne said:
QuickMix is a simple applet that allows you to store all or part of the
current state of your audio mixer in a settings file, and to restore the
mixer to that state whenever you want. "

http://www.ptpart.co.uk/quickmix/


I hadn't seen that one at the time of my research (I wish I had, because I
probably would have used it). However, I'm still glad I added the scripting
and hotkey capability because (from what I can tell) QuickMix does not allow
you to increase or decrease the setting of a control from where it is *now*.
In other words, if I want to have a hotkey that raises the volume by 10%
each press, I don't think QuickMix is the right tool for the job. Nor is
QuickMix quite as convenient since it doesn't appear to support hotkeys in
general (so it takes a few more clicks or keypresses to change the setting).

Here are the full capabilities of AutoHotkey's SoundSet. Since you have so
much experience with mixer settings, if you happen to notice any flaws with
my approach, or improvements that could be made, I'd welcome them:
http://www.autohotkey.com/docs/commands/SoundSet.htm

Thanks for the info, I'll be recommending QuickMix to those who don't need
scriptability and hotkey-ability for their mixer settings.
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top