BackgroundMusic README

The project's README from github.com/kyleneideck/BackgroundMusic. As one markdown file: README.md.

Background Music

macOS audio utility

Overview
      Auto-pause music
      Application volume
      Recording system audio
Download
Run / Configure
Build and Install
Uninstall
Troubleshooting
Related Projects
License

Overview

Note: Background Music is still in alpha.

Auto-pause music

Background Music automatically pauses your music player when a second audio source is playing and unpauses the player when the second source has stopped.

The auto-pause feature currently supports following music players:

Adding support for a new music player is usually straightforward.1 If you don't know how to program, or just don't feel like it, feel free to create an issue. Otherwise, see BGMMusicPlayer.h.

Application volume

Background Music provides a volume slider for each application running your system. You can boost quiet applications above their maximum volume.

Recording system audio

You can record system audio with Background Music. With Background Music running, launch QuickTime Player and select File > New Audio Recording (or New Screen Recording, New Movie Recording). Then click the dropdown menu (⌄) next to the record button and select Background Music as the input device.

You can record system audio and a microphone together by creating an aggregate device that combines your input device (usually Built-in Input) with the Background Music device. You can create the aggregate device using the Audio MIDI Setup utility under /Applications/Utilities.

Download

Requires macOS 10.13+.

You can download the current version of Background Music using the following options. We also have snapshot builds.

Option 1

Download version 0.5.0:

BackgroundMusic-0.5.0.pkg (788 KB)

MD5: 2405d83ac3e2a29fb2c9bf5beb6eaceb
SHA256: c7742b48ac2e9ea955fea66e5c13bb56be5f1487e0b12bad93820984bccb69ef
PGP: sig, key (0595DF814E41A6F69334C5E2CAA8D9B8E39EC18C)

Option 2

Install using Homebrew by running the following command in Terminal:

brew install --cask background-music

Run / Configure

Just run Applications > Background Music.app! Background Music sets itself as your default output device under System Settings > Sound when it starts up (and sets it back on Quit).

Launch at Startup (Optional)

Add Background Music to System Settings > General > Login Items.

Installing from Source Code

Background Music usually takes less than a minute to build. You need Xcode version 10 or higher.

Option 1

  1. Open Terminal.
  2. Copy and paste the following command into Terminal:
(set -eo pipefail; URL='https://github.com/kyleneideck/BackgroundMusic/archive/master.tar.gz'; \
    cd $(mktemp -d); echo Downloading $URL to $(pwd); curl -qfL# $URL | gzcat - | tar x && \
    /bin/bash BackgroundMusic-master/build_and_install.sh -w && rm -rf BackgroundMusic-master)
More info...

This command uses /bin/bash instead of bash in case someone has a nonstandard Bash in their $PATH. However, it doesn't do this for tar or curl. In addition, build_and_install.sh doesn't call programs by absolute paths. This command also uses gzcat - | tar x instead of tar xz because gzcat will also check the file's integrity (gzip files include a checksum), and will ensure that a half-downloaded copy of build_and_install.sh doesn't run.

Option 2

  1. Clone or download the project.
  2. If the project is in a zip, unzip it.
  3. Open Terminal and change the directory to the directory containing the project.
  4. Run: /bin/bash build_and_install.sh.

The script restarts the system audio process (coreaudiod) at the end of the installation, so pause any applications playing audio if you can.

To manually build and install, see MANUAL_INSTALL.md.

Uninstall

To uninstall Background Music from your system, follow these steps:

  1. Open Terminal.
  2. To locate uninstall.sh, run: cd /Applications/Background\ Music.app/Contents/Resources/.
  3. Run: bash uninstall.sh.

If you cannot locate uninstall.sh, you can download the project again.

To manually uninstall, see MANUAL_UNINSTALL.md.

Troubleshooting

If Background Music crashes and your audio stops working, open System Settings > Sound and change your system's default output device to something other than the Background Music device. If it already is, then change the default device and then change it back again.

Make sure you allow "microphone access" when you first run Background Music. If you denied it, go to System Settings > Security & Privacy > Privacy > Microphone, find Background Music in the list and check the box next to it. Background Music doesn't actually listen to your microphone. It needs the permission because it gets your system audio from its virtual input device, which macOS counts as a microphone. (We're working on it in #177.)

If the volume slider for an app isn't working, try looking in More Apps for entries like Some App (Helper). For some meeting or video chat apps, you may need to do this to change the current meeting volume.

Known issues and solutions

Many other issues are listed in TODO.md and in GitHub Issues.

Related projects

Non-free

License

Copyright © 2016-2026 Background Music contributors. Licensed under GPLv2, or any later version.

Background Music includes code from:


[1] However, if the music player doesn't support AppleScript, or doesn't support the events Background Music needs (isPlaying, isPaused, play and pause), it can take significantly more effort to add. (And in some cases would require changes to the music player itself.) ↩

BackgroundMusic (kyleneideck/BackgroundMusic)

Searching Database…

这是干什么的?一款免费的 macOS 音频工具,能做三件事:当其他音频源开始播放时自动暂停你的音乐,为每个应用提供独立的音量滑块,还能录制 Mac 的系统声音。
这是个普通应用,还是会改变 Mac 处理声音的方式?它会安装一个虚拟音频设备,启动时把自己设为 Mac 的默认输出设备,退出时再恢复你原来的设备——它就是靠这种方式来查看和控制每个应用的音频的。
我的 Mac 上能用吗?需要 macOS 10.13 或更高版本。如果你想从源码编译,需要 Xcode 10 或更高版本——编译通常用不了一分钟。
最大的坑有哪些?它还处于 alpha 阶段。把某个应用的音量调到 50% 以上可能会出现削波失真,输出仅支持双声道立体声设备,而且 VLC 或 Skype 这类应用可能会干扰自动暂停功能。
它为什么要麦克风权限——是在偷偷录我吗?不是。macOS 把它的虚拟输入设备算作麦克风,所以必须申请这个权限,但 Background Music 实际上从不监听你的麦克风。
它是免费开源的吗?是的,它是基于 GPLv2 或任何更高版本授权的免费软件。
自动暂停支持哪些音乐播放器?支持 iTunes、Spotify、VLC、VOX、Decibel、Hermes、Swinsian 和 GPMDP。添加新播放器通常不难,除非它缺少 Background Music 所需的 AppleScript 事件(isPlaying、isPaused、play 和 pause)。
怎么用它录制系统声音?在 Background Music 运行的情况下,打开 QuickTime Player,新建一个音频录制,然后选择 Background Music 作为输入设备。如果想同时录制麦克风和系统声音,可以在“音频 MIDI 设置”里把两者合并成一个聚合设备。
能不能把声音很小的应用调得比它的最大音量还大?可以——每个正在运行的应用都有自己的音量滑块,Background Music 能让你把声音偏小的应用调到超过它们正常情况下的最大音量。
Size
2.2 MB
Stars
19.3K
Age
10y
Commits · 90 Days