# BackgroundMusic
**Repository Path**: xtdun/BackgroundMusic
## Basic Information
- **Project Name**: BackgroundMusic
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-07
- **Last Updated**: 2020-12-16
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README

# Background Music
##### macOS audio utility
 [Overview](#overview)
[Overview](#overview)
      [Auto-pause music](#auto-pause-music)
      [Application volume](#application-volume)
      [Recording system audio](#recording-system-audio)
 
[Download](#download)
 
[Build and Install](#build-and-install)
[Uninstall](#uninstall)
[Troubleshooting](#troubleshooting)
 
[Related Projects](#related-projects)
 
[License](#license)
  
# Overview
+ Automatically pause/unpause your music player when other audio sources are playing/stopped
+ Per-application volume control
+ Record system audio
+ No restart required to install
##### *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:
+ [iTunes](https://www.apple.com/itunes/)
+ [Spotify](https://www.spotify.com)
+ [VLC](https://www.videolan.org/vlc/)
+ [VOX](https://vox.rocks/mac-music-player)
+ [Decibel](https://sbooth.org/Decibel/)
+ [Hermes](http://hermesapp.org/)
+ [Swinsian](https://swinsian.com/)
+ [GPMDP](https://www.googleplaymusicdesktopplayer.com/) 
Adding support for a new music player is usually straightforward.[1](#f1) If you don't know how to program, or just don't feel
like it, feel free to [create an issue](https://github.com/kyleneideck/BackgroundMusic/issues/new). Otherwise, see
[BGMMusicPlayer.h](BGMApp/BGMApp/Music%20Players/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](https://support.apple.com/en-us/HT202000) 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.10+**.
You can download the current version of **Background Music** using the following options. We also have [snapshot builds](https://github.com/kyleneideck/BackgroundMusic/releases).
### Option 1
Download **version 0.3.2**: 
 BackgroundMusic-0.3.2.pkg (571 KB)
> MD5: 7f34d9e6595566f3ba14e7afc89c86a2
BackgroundMusic-0.3.2.pkg (571 KB)
> MD5: 7f34d9e6595566f3ba14e7afc89c86a2
> SHA256: 0cd7b488b5ab97a1ecb496e484a6c209c29f35ab503e6f73b45e56719a7aba18
> PGP:
> [sig](https://github.com/kyleneideck/BackgroundMusic/releases/download/v0.3.2/BackgroundMusic-0.3.2.pkg.asc),
> [key (0595DF814E41A6F69334C5E2CAA8D9B8E39EC18C)](https://bearisdriving.com/kyle-neideck.gpg)
### Option 2
Install using [Homebrew](https://brew.sh/) by running the following command in **Terminal**:
```bash
brew cask install background-music
```
If you want the snapshot version, run:
```bash
brew tap homebrew/cask-versions
brew cask install background-music-pre
```
# Installing from Source Code
**Background Music** usually takes less than a minute to build. You need [Xcode](https://developer.apple.com/xcode/download/) version 
8 or higher.
### Option 1
1. Open **Terminal**.
2. Copy and paste the following command into **Terminal**:
```shell
(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.