Cerebro Seco

Se faciliter la vie informatique sans sacrifier ses principes!

Aller au contenu | Aller au menu | Aller à la recherche

Record bidirectional audio using JACK audio

Ever wanted to record what's playing in your Mac? Unfortunately such a simple process has been made difficult by, well, I don't really know. First things first, many commercial software actually enable you to record from any source to any destination, being it a mic, an application, external audio interfaces, but they are quite expensive.

Difficulty: medium to hard

So, let's sacrifice (again) commodity for open-source. To understand what this post is about, here is a quick-and-dirty drawing of what I wanted to do. For some reason, the people who helped me consider options kept on thinking there was some kind of external hardware involved in the process, or dubbing of an already-existing soundtrack, in simpler words, overly complicating what is a very simple goal. The tricky part was finding the right "Tap Application" for the job.

Two different cases, one where a sound coming in from the mic would be recorded at the same time as a sound from an application, while allowing sound to come out in the speakers, another when the application runs full duplex.


So first start by downloading an installing Jack OS X. It's a rather old version, but still does the job correctly.

First step: Adjust settings

Start JackPilot from the Jack folder in your Applications folder. Two small windows should appear, one for the preferences, one for controlling JackRouter, the back-end process doing all the dirty work.


If this is the first time you start, at least have a look at the preferences by yourself. Default ones will do the job properly, but it always pays to get an overview.


For the applications listed above, both your Input and Output should be set to Integrated in or out. If you have different devices that can send or receive sound to or from your Mac, they should be listed here.

Virtual input / output channels: unless your application, at the right of the drawing, uses more than two channels (stereo operation), leave this alone. For the recording application, it may be useful to provide more than two channels if it supports it, but most of the time you will want to get a mixed, stereo track. Hence, two channels are ok here.

Auto-connect with physical ports should be left checked at all times. Some advanced applications may require that you uncheck it, but that won't be covered here.

Second step: Start JackRouter

Click on Start, then on the Routing button that is now active. This will show you the following arcane window:

Capture_d_e_cran_2013-09-02_a__17.31.23.pngIn the left pane, applications and devices that output sound.

In the middle pane, applications that can receive sound. Please pay attention here, as some recording applications, such as Audacity, will only appear when you start an actual recording. This is silly as it will leave a blank space at the beginning, but you can always cut it later.

In the right pane, established connections are indicated. In fact, you can route as many input to as many output as you like.

Third step: Tapping the connection

This is the trickiest part, as you need to get everything synchronized by hand.

First, start JackRouter clicking on the Start button you saw previously.



Second, make sure JackRouter is set up both as your input and output device.

Third, click on Routing in the previous window, then start playing the sound in your application, the one on the right as on the drawing. It should appear in the left pane of your router, and add itself below the system device, containing the microphone ("capture" device).

Fourth, start recording application, and make sure JackRouter is set up as the input device. For some strange reason, Audacity didn't appear in the middle pane right away. For this software to appear in the middle pane, you need to start an actual recording. Click on the Record button. If everything is correctly configured, you should see a flat line, as you just turned on the sound router, but didn't route anything through it yet.


Fifth, while sound is playing, make a single click on the name of the application playing a sound, then a double-click on the recording application.

Do the same making a single click on System > capture, then a double-click on the recording application.

Now, you should be recording both the microphone input and the audio coming out of an application.