10

I'm often victim to some loud sound playing on my computer all of a sudden when I have my volume level turned up already to watch a quiet video. I can't turn everything down to the level of the quietest video I will ever watch; that's impractical. I can't even control the volume level of some applications.

Is there an audio proxy or some other plugin that can limit how loudly a sound will be outputted from my built-in audio card? I'd like an audio output level limit control in addition to the system volume control. For example, if I have my volume up all the way to watch a quiet video, any loud sound that plays should sound as if my volume is set to half or something. I've got my Mac connected to external speakers with an analog 1/8" cable.

5
  • 1
    I was about to ask a similar/same question but a quick search found yours... from 2014! Did you ever find a solution? I wouldn't care if it altered the "experience" somewhat - it could temporarily mute or even pause the video or audio in my browser or viewer, as long as I could be sure it would stop/block a sudden increases in sound level.
    – uhoh
    Commented Aug 25, 2018 at 18:14
  • 1
    @uhoh I didn't, but I also didn't try very hard myself. There is Soundflower that acts as both an audio input and output, piping from the input to the output. There's probably some other tool that could take the Soundflower audio input, apply the normalization, then output to wherever. But it might be clunky unless you program a little menu bar app to do it. 2014... back then I didn't know any of that stuff; I was a kid graduating from high school instead of a Google engineer!
    – sudo
    Commented Aug 26, 2018 at 2:56
  • I really like that idea! My programming skills are limited to Python, but maybe there is still a way...
    – uhoh
    Commented Aug 26, 2018 at 3:00
  • 1
    @uhoh You could probably rig something up through GarageBand as a first pass just to test the rest of the pieces. I'm not familiar with any of the libraries for handling audio... except for in Java, bleh. I'd probably give it a shot if it were a more important problem.
    – sudo
    Commented Aug 26, 2018 at 3:18
  • Thanks again. There are certainly lots of people in the world in my not-exactly third world situation; it's hot so I have a fan running 24/7 so need to keep volume high enough to hear the quiet moments (especially people who dramatically modulate their spoken volume in order to sound "interesting") yet the walls are thin and/or windows are open so loud sounds disturb neighbors late at night. I'm "boxed in" in terms of acceptable sound levels. However these people are less likely to actually go out and pay for an app. Oh well, thanks!
    – uhoh
    Commented Aug 26, 2018 at 3:39

3 Answers 3

3

For a free solution to add a compressor/limiter to the system-wide audio, you can use Soundflower along with Apple's AU Lab:

https://github.com/mattingalls/Soundflower/releases

https://www.apple.com/itunes/mastered-for-itunes/

Following these steps:

  • Install Soundflower and AU Lab.
  • Open System Preferences > Sound, and set both the Sound Effects and the Output to play through Soundflower (2ch).
  • Open AU Lab, and in the Document Configuration window, under Factory Configurations, select Stereo In/Stereo Out.
  • Set the Input to Soundflower (2ch), and the output to Built-in Output.
  • Click Create Document.
  • In the Output 1 channel strip under Effects, select Apple > AUDynamicsProcessor.
  • Adjust the settings in the Dynamics Processor window as desired.

A similar setup using the AUDynamicsProcessor is possible with the commercial Audio Hijack:

https://rogueamoeba.com/audiohijack/

The Hear app also has a limiter, and seems to use less CPU resources than the above. However, it's no longer in developoment and has limited support:

https://www.prosofteng.com/download/?hearmac

While these are answers to the question of how to add a compressor/limiter to the overall system audio, there are some drawbacks. One is that the above solutions may use significant CPU resources. Another is that you'll most likely need to remember to turn it on and off when watching a movie. Otherwise, having the compressor on all the time may reduce the overall dynamic range and sound quality of your computer, for example when playing music.

Rather than compressing or limiting the overall system audio, another approach is to compress then boost the quiet parts of movies so that you don't have to turn up the volume level on your speakers. I use mpv ( https://mpv.io ) to play video, which has several options for precise dynamics control including the "lavfi compander" or the "acompressor.lua" script, with very little impact on CPU usage. VLC also has a built-in compressor found in Preferences (Show all) Audio > Filters > Compressor.

Audio Hijack can be used to route the audio of an app that has no native compression options through dynamics processing. There are also other options with Audio Hijack, such as routing your movie's audio to external speakers, while routing everything else to internal speakers with a separate volume control.

0

It sounds like you're looking to essentially accomplish something like real-time 'Dynamic Audio Normalization'.

In order to accomplish this, as answered above, all incoming audio has to be sampled and processed continuously. It can be CPU intensive and/or cause slight delays/glitches in your audio output. "Real-time" audio processing is quite challenging.

While it doesn't normalize the volume, Volume Limiter for Mac, available on the AppStore as well as website does limit the volume. (The web version offers a free trial). It has advanced capabilities, including limiting by audio device, which may be a helpful alternative.

-1

Sonarworks Systemwide, it's not free.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .