KeyRoutines
StepFreeaudio.setVolume

Change the Windows 11 volume automatically with a routine

Set volume changes the level of the master output, the microphone, one device or one app. Use it to set a quiet level at night, a louder level for speakers, or a steady mic level before you record.

How it works

  • Pick whose volume to change, then set it to a level or raise or lower it by an amount.
  • Levels go from 0 to 1, so 0.4 is 40 percent.
  • Raising and lowering read the current level first and stop at 0 and 1, so repeated presses never overshoot.
  • The step outputs the new level and the previous one, which lets a later step restore it.

Routines that use it

Volume keys on any keyboard

Two Hotkey routines raise and lower the master volume by 0.05 each, for keyboards without media keys.

Quiet hours

At a time at 23:00 sets the master volume to 0.2, and another routine at 08:00 brings it back to 0.5.

Recording prep

Before starting OBS: record / stream / replay, set the microphone to a fixed level so every recording sounds the same.

Settings

SettingWhat it does
TargetWhose volume: the master output, the microphone, an app or one device.
ChangeSet it to a level, or raise or lower it by an amount.
Level0 to 1 (0.4 is 40 %).

Good to know

  • An app target only works once that app has played some sound.

Questions

How do I set the volume to a specific percentage on a schedule?
Use an At a time trigger with a Set volume step on the master output and a level such as 0.3 for 30 percent. It runs every day, or only on the days you pick.
Can it change the microphone level too?
Yes. Choose the microphone as the target and it sets the default recording device's level the same way.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.