Tutorial: Mastering with JAMin and Ardour

by Ron Parker (Mirror Image Studios), v0.2, 30th March 2005

1. Intro

The document is an accompaniment to the coldduck.jam and coldduck.ardour sessions. It is an explanation of the mastering techniques used in the production for the song Cold Duck. The song is a live performance by the Terrace Martin Trio at Arnellia's bar and restaurant in St. Paul, Minnesota from Sunday, November 14, 2004. It is engineered, mixed and mastered by Ron Parker of Mirror Image Studios.

In the best case scenario mastering is the control of loudness. This understanding is ideal because it is a clear and simple way to demonstrate and study common mastering techniques.

The JAMin session misuses its scenes to create a sequential ordering of the procedures that were applied to increase the loudness of the song. Users are able to select scene 1 and have JAMin configured for demonstrating increased Input level. Scenes 1 through 4 demonstrate different techniques that are combined to increase and control loudness.


Typical mastering jobs are concerned with controlling the loudness for groups of songs so that their volumes are comparable with each other.


In juxtaposition to the simple audio mastering techniques described within this document are sophisticated control opportunities made possible by the routing, transport, automation and OSC features of JAMin, Ardour and Jack Audio Connection Kit (JACKD). Subsequent versions of this document will demonstrate these features in a study of mastering with multitrack sources and many songs.

2. Running the Tutorial

The JAMin and Ardour session files are distributed together in the jam-ard-tutorial.tar.gz tarball. Select a directory to unpack the tarball:

cd  directory/of/choice
tar xvzf jam-ard-tutorial.tar.gz

After unpacking the tarball the cold-duck_master01/sounds/coldduck-unmastered.ogg file must be converted to coldduck-unmastered.wav.

cd cold-duck_master01/sounds/
oggdec coldduck-unmastered.ogg

The next step is to open the JAMin coldduck01.jam session and then open the Ardour "coldduck-master01 session. If you don't follow this order the routing between Ardour and JAMin will break.


Ardour will open the session with an error message because it can't find the correct .wav files.

  1. jamin -p -f coldduck01.jam
  2. cd cold-duck_master01
  3. ardour cold-duck_master01.ardour

The broken Ardour session is fixed by Importing coldduck-mastered01.wav into the session.

  1. With the left mouse button click on Regions/name

    Ardour Region/name selction widget.
  2. Choose Import audio which causes the Import dialog window to be presented.

    Ardour Import dialog window with cold-duck_master01.wav selected and ready to be imported.

Navigate to cold-duck_master01/sounds, select coldduck-unmastered01.wav and left mouse click on Import selected. Save the session after the import is complete.

The final step before running the session is to Route the Ardour "master" bus output ports to point at the hardware playback ports for the system where the session is being run.

3. Mastering

The steps for controlling loudness can be examined by sequentially advancing through the scenes beginning with 1 and ending at scene 4. Notes for adjustments made at each step are included.


  1. Input level adjusted to increase volume
  2. Soft clip limiter and Limiter inputs adjusted to increase loudness
  3. Input level lowered to prevent JAMin Limiter input overs at 05:28:07
  4. limiter max output set to -0.5db to create a master that compensates for clips produced by oggenc.

Steps 1 through 4 are simple enough to be executed in less than one minute for any typical song. The JAMin Input, Boost and Limiter Inputs are used to achieve appropriate loudness.


Toggle the Main Output Bypass button on and off to compare the original levels with the mastered levels.

4. Controlling Source Levels

Desirable loudness has been achieved with the adjustments made in steps 1 through 4. This increase in loudness must be maintained but there is a problem with levels that exceed 0.0dbfs at the input stage of JAMin. Unacceptable level spikes can be observed around 07:09:01 on the Ardour timeline. The final procedure for controlling loudness is to insert the TAP Scaling Limiter into the post fader position of the Ardour track "coldduck" and configure it to prevent levels from exceeding 0.0dbfs at the input ports. Within the Ardour track "coldduck" the TAP Scaling Limiter is inserted post fader. The post fader positioning causes the limiter to be the final output stage so all levels influencing adjustments done within the track are controlled by the limiter.

Tap Scaling Limiter being used in Ardour to control short duration volume spikes.

In this example limiting the source is an excellent solution because the level spikes push into the limiter for a short enough duration to be unnoticeable to the listener. Meanwhile most of the song is never scaled because it doesn't achieve the threshold level where limiting begins. Consequently the desired loudness is preserved while eliminating the unacceptable peaks at the JAMin Inputs.

One alternative to limiting the peaks is reducing the input level of JAMin but in this example it would be an inferior choice because it causes a volume adjustment across the entire song.


The TAP Scaling Limiter was selected as a test to see if it would work. And it does. However, a "brickwall" limiter would be equally affective and perhaps better. Compression also could have been used.

5. Ardour Export Range

With desirable loudness achieved the next task is producing a mastered version of the song. The fastest method is an Ardour Export Range. Put Ardour into Range mode (screenshot), drag the mouse along the desired region to create a highlighted range. Under File select Export Range. The dialog window presents a number of choices. You need to select a location for the file to be written and a name for it. Make the following choices:


This example assumes the final destination is compact disk.

In the Output section select the Left and Right channels for master:out1 and master r:out2. The final step is to perform the Export.

6. Reviewing the Results

New masters must be reviewed and Rezound produces excellent visual reports for clip detection and it's a fine JACKD playback client. It is unacceptable to have any clips in a file and it's very easy to make errors or have a software or hardware performance issue ruin the exported process.

Rezound with vertical red lines indicating clips.

7. Final Destination

Final Destination If the final destination of the file is an oggvorbis network stream the amplitude of the master needs to be around -0.5dbfs. This is because oggenc increases amplitude during the conversion process. I have no clue why and definitely don't like that a piece of software manipulates our carefully constructed master. Oh well!

8. Routing

Appropriate routes are the most direct paths. The routing for this session connects the Ardour source track outputs to JAMin inputs which are returned to Ardour bus inputs that are finally patched to hardware playback ports.

Ardour Track Bus Inspector, source track output.

JAMin returns to the inputs of the Ardour bus Master.

Ardour Track Bus Inspector JAMin outputs returned to Ardour.

The Ardour Master bus outputs are routed to the appropriate alsa_pcm:playback_N audio card hardware ports.

Ardour Track Bus Inspector hardware ports for monitoring playback.

The correct hardware ports are determined at the local machine. This guide is written on a machine that uses the alsa_pcm:playback_15,16 hardware ports for an RME9652 card.

[back to top]