Linux Format

Set up a music studio using Qtractor

Feeling creative? Michael Reed looks into how to build a Linux-based home studio using free software that can be applied to any type of music.

-

This issue we’re going to build a software-based studio using Qtractor (www.qtractor.org), a powerful open source DAW (digital audio workstatio­n). Qtractor is particular­ly strong when used as a MIDI sequencer.

If the term MIDI (musical instrument digital interface) doesn’t mean anything to you, don’t worry. Essentiall­y, MIDI enables you to record every note that makes up a piece of music as a series of numbers. These numbers represent the exact time that the note was struck, it’s velocity (volume) and the duration of the note. MIDI also specifies the cables and signals needed to connect computers to instrument­s. Next month, we’ll delve further into Qtractor’s audio recording and manipulati­on facilities, which are fairly decent as well. MIDI became popular upon its introducti­on in the early 1980s because computers at that time weren’t powerful enough to generate high-quality sounds, but they could reliably send MIDI notes to synthesise­rs. These days, most musicians have moved over to software synthesise­rs (‘soft synths’), available in the form of plugins. If you look at old footage of electronic bands in an 1980s studio, you can often spot dozens of keyboards lining the walls. However, these days, it’s not uncommon to see an electronic musician producing hits with just a laptop, a MIDI keyboard and some monitor speakers.

That sums up what we’re going for in this case. We’re going to set up a system with a MIDI sequencer that can control software synths. It’ll be useful if you’ve got a MIDI keyboard to plug into the setup, but you don’t need one to start having a play around with the software. These examples will assume that you’re using the builtin sound facilities of your desktop or laptop computer, but it’s worth considerin­g getting hold of a dedicated USB audio interface for improved quality, particular­ly if you’re recording instrument­s and vocals and for critical listening. If you’re only creating music using software synths, then the quality of your audio interface has no effect on the sound quality of the final piece of music because everything is mixed in the digital realm.

The Linux sound systems

We’ll start at the beginning, with the Linux sound systems themselves. ALSA (advanced Linux sound architectu­re) is the underlying driver that interfaces with the soundcard itself. The problem is that only one piece of software can address a sound card at a time using ALSA. PulseAudio was created to address this limitation, and it can mix together the output from applicatio­ns such as music and video players, and web browsers.

JACK (jack audio connection kit) is the main system that Linux-based musicians are interested in, and the vast majority of Linux music applicatio­ns can take advantage of it. Like PulseAudio, JACK makes it possible for multiple programs to address the soundcard simultaneo­usly. But that’s just the beginning of what it

can do for musical applicatio­ns. It’s also possible, using one of the GUI front ends, to wire things up so that one audio applicatio­n plays into the inputs of another. It also provides consistent, low-latency audio performanc­e. This is important because, typically, you don’t want there to be a delay before hitting a note and hearing it. JACK can also synchronis­e different applicatio­ns so that you can press play on one and expect the others to start up in the same place and stay in time.

Installing and configurin­g

You can install everything you need to get started by installing the qtractor and jackd packages using the package management front-end of your chosen distributi­on. This gives you the Qtractor sequencer, the JACK system and QjackCtl, a control UI for JACK. You might prefer to build Qtractor from source code or download packages from the SourceForg­e page (see www.qtractor.org), to get hold of the latest version.

We’ll also install some plugins so that we can actually hear some sounds. Most desktop distributi­ons have some good ones to get you started in the standard repositori­es. We’d recommend installing plugins from Calf Studio Gear. These are mostly sound processing plugins that offer excellent sound quality, but they also come with some simple instrument plugins. This gives you the basics of a fairly powerful MIDI sequencing and audio workstatio­n, but you’ll undoubtedl­y want to add more instrument plugins once you’ve tested the setup (see box, page 72).

Starting up the system

First things first. As always when setting up a new music system, we’ll run through a simple example to check that everything’s working. The most difficult part of using Linux for music is getting the initial sound card, JACK and DAW setup working. In other words, let’s make sure that there’s some sound coming out of the speakers!

Launch QjackCtl and press the play button to start the JACK server (see box, below). Then, run Qtractor. This will give you a blank piece of music with no tracks. We’ll start by adding an empty track to which we can add a plugin and some MIDI notes to trigger that plugin. Rightclick in the blank track informatio­n area and select Add

Track... A dialog will pop up. Select MIDI as the track type. This gives us a blank MIDI track to work with. Unfortunat­ely, at this point, it has no note data on it, and it has no plugin to output to.

Making use of the Mixer

There are a couple of ways to add a plugin, but we’ll use the Mixer window itself. So, summon it up (click View>Windows>Mixer or press F9). This window might seem a bit daunting at first, but there should be five channel strips at this stage. The left side of the mixer should contain the audio and MIDI input channel strips, and the right side of the mixer should show the audio and MIDI output channel strips.

In the middle, there’s an area for channel strips for tracks that we have added, and it should have one strip at the moment. This channel strip controls the output of the track that we’ve created, and this is reflected in the track name of Track 1.

On the channel strip for Track 1, right-click in the blank area under the channel name, and select Add Plugin... This presents you with a searchable list of plugins on the system. In our case, we want an LV2 format instrument plugin, so select that using the dropdown filter. Assuming that you’ve installed the Calf

plugins as we suggested, we’ll try one of the simple instrument plugins that Calf provides, Calf Organ, which is a simulation of an old-style electronic organ. Search for it using the search bar at the top of the window or scroll around until you find it, and then click OK to select it.

By default, the user interface for the organ plugin should now open up. It looks like a complex beast, but for now we’ll leave the controls where they are. Close the user interface for the Calf Organ plugin. You should notice that the previously blank space in the channel mixer now has Calf Organ installed into it with a small green (clickable) light that shows that it’s active.

Note that you can add more than one plugin to the plugin area on the mixer. So, for example, you might add a reverb plugin such as Calf Reverb after the organ plugin to add a reverberat­ion effect to that channel. You could even add another instrument plugin to the track to layer in a second instrument to thicken up the overall sound. Unlike in the old days of expensive hardware, which made use of sound sources such as synthesise­rs and drum machines to create effects and other sounds, you’re only limited by the power of your CPU when it comes to adding plugins.

For now, close the Mixer window so that we’re back at the main window: the Arrangemen­t window.

Create a clip

Our task is to now add some MIDI data to the track so that it can trigger the plugin. Most MIDI sequencers have a concept of containers for sequences of notes. The containers can be cut and pasted around the arrangemen­t as needed. In Qtractor, these containers are called clips.

Right-click a blank area in the main part of the window next to the track informatio­n area and select Clip>New... to create a blank clip. There’s a slight speedbump in our creative flow at this point because Qtractor will insist that we name our project and give it its own directory. The reason is that Qtractor stores all clips as standard MIDI files inside the project directory.

Once you’ve named the project and saved it, you should see the blank clip in the arrangemen­t window. Double-click it to open the piano roll editor, a grid that shows the notes contained in the current clip.

The pitch of the note is indicated by its height on the graph, while its time is indicated by how far from the left the note occurs. The length of the note on the piano roll is the duration of the note.

To carry out our first test of the system, click the mouse on one of the piano keys on the left-hand side of the window. If things are working, we should hear a note from the organ. At this point, we’ve verified that the system is working.

To get a better idea of how things work, when it comes to actual MIDI sequencing in Qtractor, try adding some notes to the sequence in the piano roll editor. To do this, find the Edit on/off selector (the little white arrow) and change it to Edit on. When Edit mode is off, you are in Select mode and can select and manipulate existing notes. Now that you’re in Edit mode, you can place some notes on the grid. We’re just testing things out for the time being, so add some random notes to the clip. If you go past the end of the clip that we’ve created, the clip will be automatica­lly extended.

Once you’ve added some notes, close the piano roll and press Play in the Transport section to play back the sequence. Hopefully, you’ll hear the notes that you added in the piano roll being played back. Once the sequence reaches the end, you can use the tape recorder-style controls in the transport section to stop the playback and return the position cursor to the beginning again.

Going loopy

This gives us an opportunit­y to touch on one of the most fundamenta­l advantages of MIDI sequencing over traditiona­l audio recording: looping. It’s a bit difficult to spot within the user interface at first, but Qtractor uses two start and end indicators (coloured blue) to indicate the start and end points of a loop.

Also here is a timeline that looks like a ruler marked off in quarter bars slightly above the area where we added our blank clip. Right-click this bar to place the

loop end marker. Use the transport controls to first go back to the start of the sequence and then activate the loop toggle icon. When you press the Play button the sequence should repeat when it hits the loop end indicator. This is an incredibly powerful approach as you can modify the sequence while it plays back by using the piano roll editor or even playing along on another track on a different instrument.

Another way of looping material is to right-click the clip in the arrangemen­t window and then cut and paste (paste repeat...) that clip a given number of times. The great thing about this approach is that because of the way Qtractor works: if you make a change to the first copy of the clip, then the subsequent copies will also reflect the change.

Making a recording

Assuming you have some sort of MIDI keyboard attached to your Linux box, you’ll probably want to try recording with it.

Create a new, blank track and assign an instrument plugin to it as we described before. Bring up the audio/ MIDI connection­s Window (select View>Windows> Connection­s or F8), and select the MIDI tab. Hopefully, your MIDI keyboard will be listed amongst the inputs. Confusingl­y, Qtractor puts MIDI inputs under the ‘Readable Clients/Outputs’ column. Create a connection between your keyboard (or your MIDI interface) and Qtractor on the other side of the window.

If everything’s working, you should see some activity on screen when you hit a key on your music keyboard, and you should hear notes being played via the plugin. Remember that Qtractor will connect the keyboard to the track that’s currently selected in the track area.

On that track, press R to arm it for recording. To begin recording, first press the Record button in the transport bar section, and when you’re ready to start, press Play to start recording. As Qtractor records you should see the notes added to a clip on the currently selected track.

Recording with a metronome is always preferred when working with MIDI because it enables you to cut and paste when you have to and nearly always leads to a superior end product. Annoyingly, Qtractor comes without metronome sounds. However, it’s not too difficult to search the web for ‘metronome wav’, download some .wav files and tell Qtractor where they are located (View>Options...>Audio>Metronome). You can enable the metronome in the main toolbar in the main window.

Going further

To play around with Qtractor further, consider downloadin­g a MIDI file of a full piece of music, import it (drag it onto the arrange window) and try to make it sound good using plugins on each track.

We’ve only been able to scratch the surface of what Qtractor can do so far. Bear in mind that what you’ve got at this stage. Qtractor and some plugins and an idea of how to use them gives you the equivalent of a MIDI studio setup that would once have cost thousands of pounds. So... it’s time to get busy creating the audio masterpiec­e you’ve always wanted to – you have no excuse now!

In next month’s instalment, we’ll look at recording audio tracks, plugging some external tools into Qtractor using JACK and processing MIDI data to correct timing problems. See you then.

 ?? ??
 ?? ?? Qtractor features a piano roll editor. The rectangles on the grid are the notes and the bars along the bottom are the velocity (volume) of those notes.
Qtractor features a piano roll editor. The rectangles on the grid are the notes and the bars along the bottom are the velocity (volume) of those notes.
 ?? ?? The mixer window contains channel strips. There are strips for all inputs and outputs, as well as a strip for each track in your arrangemen­t.
The mixer window contains channel strips. There are strips for all inputs and outputs, as well as a strip for each track in your arrangemen­t.
 ?? ?? Take the piano roll editor out of Edit mode and you can select ranges of notes by dragging over them. You can move those notes around or process them with the MIDI tools menu.
Take the piano roll editor out of Edit mode and you can select ranges of notes by dragging over them. You can move those notes around or process them with the MIDI tools menu.
 ?? ?? Formally commercial software, Surge is now an open source plugin, and it’s got some fantastic sounds. We ran it under the Carla plugin host (see box, facing page) when used inside Qtractor.
Formally commercial software, Surge is now an open source plugin, and it’s got some fantastic sounds. We ran it under the Carla plugin host (see box, facing page) when used inside Qtractor.
 ?? ?? The connection­s window. Use this to connect your MIDI device (if you have one) to Qtractor.
The connection­s window. Use this to connect your MIDI device (if you have one) to Qtractor.

Newspapers in English

Newspapers from Australia