Loop-based Music Composition With Linux, Pt. 2

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.

______________________

Similis sum folio de quo ludunt venti.

Comments

Comment viewing options

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

Looks good!

NLP's picture

Thanks a lot for your article it helped a bit to clear the basics. And very well written.

Excellent Tutorial

Bob the Builder's picture

I just saw this today. I had worked with loops under Acid Pro back in the early part of last decade. I hadn't tried Aurdor in years. This was wonderful.

I'm digging out my DVD's of loops now!

free piano sheet music

Bob Mu's picture

Playing a complete composition with piano sheet music need not be an arduous task. When you tackle its component parts one at a time, the process is much easier. When you learn the free piano sheet music free piano sheet music individual components and then put them all together, the result is a satisfying musical experience.

Love it.

Las Vegas Escorts's picture

I absolutely love the music you have provided to your blogers. This is a very good step by step process that is idiot proof. Keep up the wonderful work!

I agree with you. It can

Lasik Doctors's picture

I agree with you. It can help newbies in the field to learn more how they could actually provide good music. Looking forward to more of your pieces.

Is there a way that these

Bob1947's picture

Is there a way that these could be paid for - as they are certainly deserving of that!
meditation

incorrect example URL

Dave Phillips's picture

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

Best,

dp

Similis sum folio de quo ludunt venti.

Grea8

SNaRe's picture

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.

Agree

breast reduction's picture

Reaper works 100% perfect in linux. I have it on my machine.

It's been a while now Dave -

Anonymous's picture

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

Ketil

sound system

daisy's picture

thanks for the deep example with simple written-up.

Dave is still here

Webmistress's picture

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 on Twitter or at the Southwest Drupal Summit

Some very useful hints

Sebastian's picture

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.

Great tutorial. I am pretty

Green Man's picture

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

That's Good News.

Webgk.com's picture

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

thank you

video's picture

Thank you admin.very good.

very instructive

sytem admin - haitianite's picture

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

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix