newline

Forwarding application sound on macOS

Guide, Mac

November 01, 2020

I ran into a problem recently regarding audio routing on macOS. I own a virtual drumset (an “air drum” setup where you drum in the air and a piece of software converts it to actual drums), and I wanted to forward that sound to a video call, while also being able to hear it myself. Perhaps you’ve had a similar problem, where you wanted to e.g. record system audio. This is easily doable, using BlackHole.

My problem started when I wanted to route my virtual drumset to both a video call and my headphones, while also allowing sound input using the microphone. Of course, I also wanted to hear the person on the other end. Basically, this diagram shows what I wanted to do, with the arrows designating audio flow:

Terrible diagram of my intended audio setup

This isn’t possible just on macOS, so I installed BlackHole. This is a virtual audio driver, which you can use for routing audio (i.e. you can send audio to it, and get audio from it). You might be familiar with Soundflower; this is similar but more maintained, and best of all doesn’t require a kernel extension (explaining why those are a bad idea is out of the scope of this post, but they’re a bad idea). As such it’s much easier to install, you can get it from Homebrew or any other way.

Once it’s installed, open the Audio MIDI Setup app, click the ‘+’ in the bottom left corner, and create a multi-output device. Make sure Built-in Output (or “Mac Speaker” or whatever else it’s called) is checked and at the top of the list. Then, check “BlackHole 16ch”, and also check its “drift correction” option. You can name the device whatever you want.

Multi-output device setup

Then, in the app whose audio you want to forward (in my case, the software for my virtual drumset), change the output device to this newly created multi-output device. If you want to send your microphone through, open a digital audio workstation (e.g. GarageBand or Logic Pro) and create a new audio track, setting the track’s input to the microphone and its output to “BlackHole 16ch” (make sure to enable monitoring by clicking the ‘I’ next to the track!). Finally, in the video call, set your microphone to “BlackHole 16ch” and your output to your headphones/speaker/whatever.

The setup we created looks like this:

BlackHole and multi-output device setup diagram

And that’s it!

In essence, you can use this multi-output device to capture any sort of system audio. Just go to System Preferences, click on Audio, and change the output device to the created multi-output device. Then, in your recording software (or wherever you want the audio to end up), set the input to “BlackHole 16ch”.

For more information, check out the Github repo, or the project’s homepage.