Loop-based Music Composition With Linux, Pt. 2

September 30th, 2007 by Dave Phillips

Your rating: None

In this second and final part I'll demonstrate some of the loop-specific tools I've found in Ardour, Reaper, and Audacity. Tutorials and links to project demos are included, so warm up your headphones and let's get loopy.

Easy Looping With Ardour

First up, a brief tutorial on using loops to create a track. I've employed the latest Ardour 2.1 for this article, but the examples should be realizable on any modern sequencer. In fact, Ardour itself isn't really a sequencer, but it happens to work nicely at the job.

After starting Ardour, we load a series of drum loops with the Session/Add Existing Audio dialog, assigning them to separate tracks (the default action). Figures 1 and 2 illustrate the process. By the way, pictures tell the story best here, so this article is a bit image-heavy.

Figure 1: Adding existing audio files to Ardour


Figure 2: Files assigned to new tracks


The pictured loops were recorded at 110 BPM, so we need to reset Ardour's tempo. Right-click on the red Tempo mark (see Figure 2), select Edit, set the tempo to 110, and now the loops should fit perfectly to the measure. Alas, sometimes they don't fit perfectly, as we see in the screenshot. Don't worry, the extra length is usually dead space, but it can create a problem if Ardour's Options/Crossfades is set to Created Automatically. The end of one loop will be automatically crossfaded with the beginning of the next one, causing unintended and undesirable consequences such as muting the downbeat of a drum loop. If you don't want to edit the loops themselves, unselect the autcrossfade option. If you do want, you can quickly edit your loops to a uniform length. Just set the Snap target to Bar, move the blue Edit cursor to the barline, then select all the tracks and split them at the cursor position. Delete the dead segments.

Now we can easily create a track from a seamless series of loops. Power-users will want to learn some of Ardour's keyboard map. The default map accelerates the selection and copy/paste functions, greatly simplifying the creation of basic tracks. Figure 3 shows a repeated loop with a series marked for copy.

Figure 3: A repeated loop


Drummers are pattern-playing creatures, but to keep things interesting they vary those patterns from time to time. We can liven up our example by replacing every fourth loop with a variation of the groove or a fill taken from the same source loop collection. Simply load the new set of audio files as new tracks, edit as desired, then mix and match until you find the right combination of patterns (i.e. what pleases your ears).

The example in Figure 4 uses three loops, the original groove loop and two fills. The last measure is made of two copies of the same half-bar fill, with the first copy reversed.

Figure 4: An 8-bar track with multiple loops


Ardour wasn't designed to be a beat-slicer, but you can do some handy cutting and chopping with its segment tools. Once again, the Snap setting is your friend. For our example, we'll the Snap to Beat, then use Ardour's segment lengthen/shorten function to isolate individual beats. These isolated segments can be copied and recombined into new patterns (Figure 5), and each segment can be reexpanded to all or any part of its original length, a very cool and helpful feature.

Figure 5: Beat-slicing with Ardour


To end this section I remind readers that any kind of soundfile can be used in this way, it doesn't need to be a drum loop. You can have a lot of fun forming and reforming any audio material with these tools, and then there's the LADSPA signal processing plugins and their parameter control automation. Alas, I haven't the space to get into all that here, so I'll leave its further exploration to my interested readers.

Time-stretching And Pitch-shifting With Reaper

Reaper is currently in beta-testing for its impending 2.0 release. Although the program is written strictly for Windows it runs well in Linux with Wine and very well with Wine and the wineasio driver. The Reaper forums reveal a lively interest in Reaper on Linux, and the developers will address issues with running the program under Wine.

All the applications profiled in this tutorial include tools for stretching or shrinking the time of an audio file or track (with or without shifting the pitch) and for changing the pitch of a sound (with or without changing its tempo). All of them use the open-source SoundTouch library, but Reaper supports the Dirac LE and the élastique libraries as well.

Figure 6: Reaper's Item Properties dialog


It's easy to compress or expand the tempo of an audio segment in Reaper. Right-click on the segment and open the Item Properties dialog (or press F2), then select your pitch-shift/time-stretch algorithm of choice. Close the dialog, then position the mouse over the end of the segment until the pointer becomes the stretch cursor. Left-click, then hold down the Alt key and shrink or stretch at will. As in Ardour, the Snap function makes it easy to accurately measure your loops, as you can see in Figure 7. That screenshot shows off an original segment, followed by copies of itself expanded by half and shortened by half.

Figure 7: Time-stretching with Reaper


I compared the Dirac LE and the élastique Pro algorithms using the same audio source file seen in Figure 3. The shortened results were remarkably different, and my ears definitely preferred élastique. I was less certain about the lengthened segment. Transient loss was noticeable in the output from both algorithms, a little more so in the Dirac LE transformation, but I'd say they were equally usable.

Editing Loops With Audacity

Every serious loop artist needs a serious soundfile editor. The free & open-source Audacity is a good choice, not least because it includes some very nice tools designed for editing files destined for the looping life.

Figure 8 displays our familiar source file. Once an audio file is loaded into a powerful editor (such as Audacity) it's subject to potentially severe alteration to all or any part of itself. As the advertisers say, the possibilities are almost endless. Audacity includes a full set of tools for soundfile manipulation, but space disallows a full review of its capabilities. For now we'll have to be content with a very brief look at some of Audacity's loop-oriented functions.

Figure 8: Audacity


Figure 9 displays the dialog panels for the Change Pitch, Change Speed, and Change Tempo effects. Each dialog offers more than one way to apply the effect: Pitch can be changed by specifying a musical note-name, semitonal transposition, frequency, or percentage; speed is changed by percentage or standard vinyl RPM values (revolutions per minute); and tempo can be changed by percent, BPM (beats per minute), or length in seconds. Whatever method you choose, your entry will automatically update all the dialog's fields.

Figure 9: Audacity's Change dialogs


Sound Proof

I don't usually compose with audio loops, but in the course of learning about the tools and techniques presented here I've come to respect and enjoy the process. It's a simple enough process, anyone can string some loops together and call it a song, but musical sensibility is still required if musical results are still desired. (Sorry, I couldn't resist the temptation.)

I can't make any claim on musicality for my examples, they're linked here merely to illustrate the basic use of those tools and techniques :

Outro

I hope you've enjoyed this introduction to loop music composition with Linux sound tools. Check out the programs for yourself, search Google for the many sites for free and commercial loops, and start putting together your own beat mixes. Have fun, stay tuned, and sing out.

__________________________


Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Vertaling's picture

impressed

On June 26th, 2008 Vertaling (not verified) says:

Wow, you really put a lot of time into this! Very clear descriptions, which even newbies such as myself can follow.

Vertaling Engels

Arman's picture

Interesting article. It'd be

On February 24th, 2008 Arman (not verified) says:

Interesting article. It'd be nice if there was something like FastTracker for Linux (unfortunately FT doesn't even work in Windows since XP).

Arman
Web Forms

Cascada's picture

Interesting article, is

On March 29th, 2008 Cascada (not verified) says:

Interesting article, is whether its continuation?
Cascada

Nick Desmedt's picture

Good info

On March 10th, 2008 Nick Desmedt (not verified) says:

Thx for the info, it´s been of great help to me!

Greetz

Nick

Yaro Manik's picture

I have play with music

On February 23rd, 2008 Yaro Manik (not verified) says:

I have play with music composite for a long time and currently search for some advance stuff. Here I'm. Very detail article.

Best Regards,

Earn Money Blog

Yaro Manik's picture

I have play with music

On February 23rd, 2008 Yaro Manik (not verified) says:

I have play with music composite for a long time and currently search for some advance stuff. Here I'm. Very detail article.

Best Regards,

Earn Money Blog

Anonymous's picture

Solid

On February 12th, 2008 Anonymous (not verified) says:

Thanks solid article

Nick Goa's picture

Hi Dave, Thank you for this

On February 4th, 2008 Nick Goa (not verified) says:

Hi Dave,
Thank you for this article, it was very useful for me!

Best regards,
Nick

Annette Wilson's picture

Where was this 6 months ago?

On February 12th, 2008 Annette Wilson (not verified) says:

Good solid article - where was it 6 months ago? would have saved me $$
Thanks

Anonymous's picture

Great

On March 7th, 2008 Anonymous (not verified) says:

This article is great, fortunately it has saved me $$.
Cheers - Andy

honnest's picture

hmm

On December 22nd, 2007 honnest (not verified) says:

hmm good idea.
thanks

film indir's picture

hımss

On December 28th, 2007 film indir (not verified) says:

hımss.why i cant think like this.

Dave Phillips's picture

incorrect example URL

On December 22nd, 2007 Dave Phillips says:

The Improvisation #2 is located at http://linux-sound.org/audio/improvisation-2.ogg. Sorry about the mix-up.

Best,

dp

SNaRe's picture

Grea8

On December 19th, 2007 SNaRe says:

Reaper is currently in beta-testing for its impending 2.0 release. Although the program is written strictly for Windows it runs well in Linux with Wine and very well with Wine and the wineasio driver. The Reaper forums reveal a lively interest in Reaper on Linux, and the developers will address issues with running the program under Wine.

Anonymous's picture

It's been a while now Dave -

On December 11th, 2007 Anonymous (not verified) says:

It's been a while now Dave - have you deserted us? I miss your blog!

Ketil

daisy's picture

sound system

On January 25th, 2008 daisy (not verified) says:

thanks for the deep example with simple written-up.

Webmistress's picture

Dave is still here

On December 11th, 2007 Webmistress says:

Dave Phillips is one of our featured authors and still contributes to the site regularly.

__________________________

Katherine Druckman is webmistress at LinuxJournal.com. You might find her chatting on the IRC channel.

Sebastian's picture

Some very useful hints

On December 4th, 2007 Sebastian (not verified) says:

Hello Dave,

these are some very interesting hints. Since I'm trying to port my whole music production on a linux system I had some problems finding appropriate substitutes for some loop-based tools like FruityLoops and Recycle I used to work with.

Thanks for these information and for this excellent blog in general.

Green Man's picture

Great tutorial. I am pretty

On October 12th, 2007 Green Man (not verified) says:

Great tutorial. I am pretty set on using the PC for my music creation... but this makes me curious to try it Linux.

Webgk.com's picture

That's Good News.

On October 1st, 2007 Webgk.com (not verified) says:

Wow!
It is so good to hear that now music can be enjoyed with Linux as well.

video's picture

thank you

On February 6th, 2008 video (not verified) says:

Thank you admin.very good.

sytem admin - haitianite's picture

very instructive

On January 30th, 2008 sytem admin - haitianite (not verified) says:

This is god sent . I am very slow in terms of following up instruction. I was able to understand this material. I will keep an eye out as i plan to make music the theme of my website.
http://www.haitianite.com/main

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Tech Tip Videos

From the Magazine

July 2009, #183

News Flash: Linux Kernel 3.0 to include an on-the-go Expresso machine interface! Ok, maybe not, but Linux is definitely going mobile, from phones to e-readers. Find out more inside about Android, the Kindle 2, the Western Digital MyBook II, The Bug, and Indamixx (a portable recording studio). And if you've gone mobile and you been wanting more Emacs in your life then check out Conkeror.


To compliment the mobile we've got the stationary: parsing command line options with getopt, checking your Ruby code with metric_fu, and building a secure Squid proxy. How is this stationary you ask? What can we say? It's not. We just wanted to see if anybody actually read this part of the page :) .


All this and more, and all you have to do is get your hot sweaty hands on the latest copy of Linux Journal.





Read this issue