Introduction

Milestones

Hardware and Software

setBfree MIDI

Jacking Up setBfree

Recording Organ Tracks

Inputs for Mixing

Controller for Mixing

Final Product Export

Finally

Introduction

This document is a recording project using setBfree and Ardour to describe a practical work flow for the two apps. After stumbling into the role of a developer of setBfree I realized its immediate and potential user base came from many communities with a huge variance of expertise. Most of us have strong knowledge in one area of audio, but are cripplingly weak in others. I had never tried to use MIDI in a practical way, while those doing digital audio orchestrations may not have been around the analog recording work flow when Ampex tape was king. This recording project is a way to fill in holes for all of us.


To jump right in, the three track organ blues ditty created by this project's first stage is here,setBfree Blues Ditty.

Milestones

The first stage is this description of how the above ditty was made. Next, we'll add effects and write a comparison between an analog mixing board and Ardour. The third milestone is the move to Ardour 3. Like the move to Vegas in The Godfather, we'll move from Ardour 2 to Ardour 3 and re-record the project focusing on their new MIDI features. After the project is honed and tweaked, we'll expand on it in a complimentary document to complete the setBfree's Doxygen documentation.

Hardware and Software

I've used an M-Audio Oxygen 61 MIDI controller plugged into a basic laptop(1G ram,2G processor) with the following software:


setBfree, Ardour 2, QjackCtl, a2jmidId, and aseqdump


Several apps can be substituted. For Qjackctl, Jack can be controlled from the command line. The MIDI method using aseqdump and setBfree's configuration files apply to any MIDI controller and can be connected to any Linux Jack supporting audio app including Ecasound, Audacity and Non Daw.


The MIDI mixing input are specific to Ardour, but could easily be substituted by a jack mixer including jack_mixer, or Non Mixer. Finally, as we expand the MIDI functionality after the move to Ardour 3, we'll make sure all of this works with Qtractor for those who work primarily with MIDI based apps like LMMS, Rosegarden or MusE without need for a fully featured DAW.

setBfree MIDI

For this project we use the M-Audio Oxygen 61 MIDI controller to control everything on setBfree, and for mixing levels in Ardour:

image/svg+xml

There seem to be a few fundamental ways to access the MIDI notes and messages from the knobs and faders from a controller. I figured out the technique we use in this project from comments by user AutoStatic on a thread from the Qtractor mailing list here, Qtractor List MIDI answer.


He explains the difference between MIDI note, CC, MMC and SysEx messages coming from the controller. From what I gather, if an app says it supports a particular MIDI controller that means that it reads from the MMC level where one can change mappings at the controller level specific to the vendor and device and the app will accurately read the data.


This project doesn't use this, although Ardour lists our device as supported. The method below should work with any MIDI device that your Linux computer with Alsa can connect to.


We get MIDI data at the CC level. The utility application aseqdump reads MIDI data as it comes into Alsa. We write a file of the MIDI controller numbers listed from aseqdump as we move them, and then use them to control setBfree.


First we plug the MIDI controller into the computer by USB and type aseqdump -l on the command line to see its port number. The line that outputs the following tells us that the port number is 24:


24:0 Oxygen 61 Oxygen 61 MIDI 1


Now we type aseqdump -p 24 to see the MIDI controller, note numbers with their value and velocity numbers. We are going to move all the knobs and faders we will be using and writing a file with the values output in the terminal window where we started aseqdump.


We could do the same with the notes, but for this project, the 61 notes map directly to a standard B keyboard with setBfree. I don't transpose notes, but with this mapping, this could be done from setBfree. The file that lists the knob/fader MIDI numbers is here, M-Audio Oxygen 61 MIDI outs.


To show a visual of this, we will throughout our project use the old school technique of using masking tape with magic marker on mixing board channels to remember which mics went with which instruments, vocals, effects etc, but now it's a Sharpie. Note this doesn't have to be slick as you may change tape several times a night for different setttings on your mixer or dsp instrument. Here are the MIDI numbers sent by CC from knobs and faders:

image/svg+xml

Now we need to map these values to setBfree. We do this by writing a new setBfree configuration file. In the source code of setBfree's cfg directory, there are several setBfree optional configuration files with the extension .cfg.

When starting setBfree without any flags on the command line, the default.cfg file is hard coded in. I've made a copy of the default.cfg file called oxy61.cfg, and from lines 162-177 you can see the new MIDI mappings I've made to use the faders as draw bars, along with a few buttons to control options(leslie, percussion). The new configuration file is here, setBfree modified configuration(cfg) file.


Here is a picture showing the faders and buttons we're using with setBfree from our new configuration file:

image/svg+xml

Note that the modulation wheel doesn't need updating in oxy61.cfg to work as our volume control.


We'll come back to MIDI during our editing stage with Ardour, but for now we're ready to get this show up and running.

Jacking Up setBfree

First, we get Jack running with the popular QjackCtl GUI app that we'll also use to connect all our jack apps, MIDI and audio tracks. We start QjackCtl and start Jack:

image/svg+xml

We start setBfree followed by -c and our customized oxy61.cfg configuration file on the command line:


setBfree -c oxy61.cfg


Before making the MIDI connections between setBfree and the M-Audio controller we need to start another utility app called a2jmidid to see all the MIDI devices in QjackCtl. According to Paul on an Ardour mailing list thread with the -e option a2jmidid "has better timing (jitter & latency) characteristics than the code which implements the 'seq' and 'raw' options of the ALSA backend." That thread is here, Ardour a2jmidid thread.


From the command line we have:


a2jMIDId -e


Now we go to the MIDI window in QjackCtl and connect the output of M-Audio with the MIDI input of setBfree:



image/svg+xml

Note that you can either drag the ports or click on each and press Connect to get the line from the Oxygen to setBfree.


Next go to the M-Audio controller and move all the knobs and faders we set in the oxy61.cfg file and the volume wheel to get their values synced with setBfree and set the draw bar faders to your liking. You should now be able to play the organ. For the recording, all I changed other than volume and faders was the leslie button(second over from the left).

Recording Organ Tracks

Now we're ready to start recording tracks with Ardour. Start the app and begin a new project. I called the project blue_ditty_project.


We'll be creating three tracks; one for the bass line, one for chords, and a third one for the lead. We create the tracks:

image/svg+xml

After selecting Add Track/Bus, a pop up called add trac comes up. In the settings in the pop up the field labeled, Add this many, change the number from 1 to three and hit the Add button. Three tracks should be created labeled Audio 1 for the first track, Audio 2 for the second track and Audio 3 for the third track:

image/svg+xml

Now we go to the audio section of QjackCtl and connect the output of setBfree left channel(out_left) with the input of the first track(Audio 1/in 1) of our Ardour project:

image/svg+xml

Next connect out_right to Audio 1/in 1 and connect out_left and out_right to tracks Audio 2/in 1 and Audio 3/in 1. Now the output of setBfree is connected to the inputs of the three Ardour tracks and we're ready to record.


To record track one we press the record button for Ardour(red dot), the record button for Audio 1, and then press play(green arrow) and I recorded the bass line track:

image/svg+xml

We do the same for Audio 2/in 1 for the rhythm track, and then Audio 3/in 1 for the lead track. Note that for the rhythm track, I also hit the leslie button on the controller twice for a full speed leslie sound. We should be able to hear the tracks already recorded as we record each new track.


If you can't hear the tracks already recorded, go to Monitoring in the Options section and make sure Audio Hardware does monitoring is checked:

image/svg+xml

Now we have the three tracks recorded and we're ready to mix them into our final output track.

Inputs for Mixing

We're going to mix the three tracks into a fourth track and that will be our final track exported as a stereo track. First we create a fourth track to mix the first three into. When we make the fourth track, make sure in Channel Configuration to change Mono to Stereo.


Next in the Window drop down from the Menu Bar select the Track/Bus Inspector. In the Track/Bus Inspector Window which pops up we select in the left panel, Tracks/Buses our fourth track(called Audio 4). In the middle section called Inputs, we should only see system:capture_1. In the far right section called Available Connections with the Ardour tab, we click on Audio 1/out 1 and it shows up in the Inputs section of Audio 4 in in 1 and then we click Audio 1/out2 and it shows up in in 2 . We do the same for Audio 2/out 1, Audio 2/out 2, Audio 3/out 1 and Audio 3/out2. Now the first three tracks will output to our stereo fourth track:

image/svg+xml

Controller for Mixing

Before we mix the first three tracks into the fourth track, we're going to connect their volume level sliders to three knobs on our M-Audio controller. For what we are doing, we could easily use the mouse, but this is the technique we use to turn Ardour into a mixer with faders.


Here are the three knobs we'll be working with on the controller with their track numbers:

image/svg+xml

Before connecting the knobs on the M-Audio Controller with Ardour sliders, we need to select Generic MIDI from the Control Surfaces selection from Options on the Menu Bar:

image/svg+xml

Next we place the mouse over the GUI slider we want to connect a controller knob to. Press ctrl and the center click of the mouse(on a two button mouse, click right and left at the same time for a center click) and an operate controller now message should pop up:

image/svg+xml

Here the mouse is over the slider for Audio 1 on Ardour we'll be connecting to the knob we labeled 1 on our controller by turning it. We do the same with knob 2 with slider Audio 2 and knob 3 with Audio 3.


When we record a track in track 4, the sum of the first three tracks has been routed into it from our Track/Bus configuration earlier. As we record we raise or lower the input amount from each of the first three tracks into track 4 with the MIDI knobs assigned to them on the controller.


Before starting the mix down, a few notes on mono stereo should be cleared up. I agree with Phil Spector's call to 'Bring Back Mono.' That is, I'm not into this panning of input tracks to different places in the left and right channel of the output, or a bunch of compression on the vocal(or lead track in our example) for it to sit in the middle of the mix. This proves that I'm not a professional sound engineer, because if I tried to make a living with this belief, I would starve. In the second section of this project when we add effects, we'll go over how to do all the standard left/right panning.


For this section of the project, this is mono stereo, which is a stereo out where both the left and right channels of the track are identical. We do this because some listening mediums won't play out of both speakers/headphones if it's a true one channel mono track.


I have my preference of following the pre-1971 edict of not putting too much bass in the mix. What I'm going for is bass under the level of the chord shots with the lead on top. This can be tricky, and we'll often do this many times before finding the right balance. We delete the fourth track content after each attempt until we get it where we want it.


Now we have our final product in Audio 4. All that's left is to export it.

Final Product Export

Now we have our final product in Audio 4. We now want to export it. Select Audio 4(it should become darker than the other tracks); go to Session on the Menu Bar, Export and select Export selected regions to audiofile:

image/svg+xml

The default will be the path to the project's export directory with a file name export.wav. I changed this to blue_ditty.wav, and then did the same again changing the format to OGG for the web page version.


We have two versions of our recorded and mixed three track blues ditty. The only thing left is to get rid of our deleted tracks from our editing. Go to Session on the Menu Bar and in Cleanup and select Cleanup unused sources:

image/svg+xml

When you open the project again, go to Flush wastebasket and the extra tracks will be deleted.

Finally

Now we have the final blues ditty at the beginning of this description. We've got the three tracks saved that we'll add effects to in the second stage of this project while we compare the work flow of the standard Allen and Heathe analog mixer to working with Ardour. Onward...