Music 101: The Mandriva Linux 2007 Spring song recipe
Recently I was asked to write a small article talking about some of the tools related to audio in Mandriva Spring. I realized that writing a few things about the tools would be just the same as articles you can find in many websites and magazines. But instructions on creating music step from step from scratch, picking the right ingredients for "the song recipe", are rarely to be found. So I decided to try and make a song with only the tools I had available on Mandriva Spring, and write down how to do it.
#includeResource("Skel.ArticleHeader")
Preparation
First of all, I placed some restrictions on myself. As I already have a music background and have a small studio at home, it would be unfair to use a professional music keyboard, low latency kernels, external instruments, etc. It would be defeating the purpose of this article, so I put these restrictions on the project:
- Use tools available from Mandriva Spring base DVD, adding the updates to keep
- Don't compile anything not in the Mandriva repositories
- Get resources for tools from the Internet
Songwriting recipe
Basic ingredients:
- A computer (I used a simple 1.5GHz laptop, 512 Mb of RAM) with a sound card and good headphones (for the sake of your neighbors' ears!)
- A Mandriva Linux 2007 Spring installation, updates repository available. Contrib repository optional for some extra tools
- Sound server to control everything
- A sequencer
- Some instruments
- Some effects
- A wave editor
- A brain (preferably your own!)
- Optional: DJ mix software to put your songs together in a mix tape
The sound server
Linux itself has a known issue with music production also known as "low latency issue". To explain what this means, it is like when you use a remote connection to another computer, and all your actions take place a few milliseconds after you move the mouse or press a key. In live music this is unacceptable, and if we are using live instruments or external keyboard to records the tracks the results would be pretty bad. Since we are "laptop musicians" now, and not using any external instruments, high latency is fine for now. We could go for a multimedia kernel, but this is way beyond what we need to do now.
So, after 2007 Spring is installed, you should have ALSA as your main sound server. The default install is OK, but we need something that allows us to connect multiple audio sources in a sane way, and is suited for this kind of recording operation. We're talking about JACK. Jack is a sound server designed for recording that runs on top of ALSA with some low latency properties and the other goodies mentioned above. Don't worry about configuring it: 2007 Spring has a cool tool called QJackCtl, so install it now! The package is called qjackctl. When you run it, you will see something like this:
As a regular user, you need to set up a basic configuration, so here's a screenshot with a basic setup suitable for any regular sound card (you can tweak the settings to fit your needs).
If JACK refuses to start:
Tips and Tricks 1: Mandriva's default graphical environment, KDE, uses the Arts sound server. Usually this blocks anything else that tries to use ALSA. Go to the KDE control center, and set arts to work with NoAudio input and output. If for some reason you still need KDE sound notifications, you can set Arts to run over JACK, but this is probably not the best idea as it will use up a lot of resources on your computer, so it's best to just change its output to null.
Now we have our sound server set up, let's talk about the sequencers.
Sequencers
Fortunately (or not) we have all three common types of sequencer available on 2007 Spring. We have old school trackers, old school do-it-all sequencers and new-wave sequencers. I decided to pick one of each kind and see which was best for the project.
For the tracker, I picked "soundtracker", from contrib repository. Old school trackers bring back memories of the old Amiga years when I started to play with music. Usually trackers have a clumsy interface, have a completely different approach to the standard way musicians are used to making music, and can be easy or hard to learn depending on your background. In their favor, they have everything integrated: an instrument editor, wave sample editor, (poor) MIDI control, and tons of mnemonics to learn! Against them is the fact that you can't add external effects (as we will see later). Here's a screenshot of soundtracker:
It would be easy to finish the article here, but soundtracker is too ugly (GTK+ 1.2 interface) for me and I moved on from trackers a long time ago, so let's look at the other options.
Old school sequencers are like Cakewalk, early editions of Cubase, and in some ways Logic Audio. For Mac users, they are like the fathers of Garage Band. This kind of sequencer have a do-it-all philosophy, but in a modular way. You can edit tablatures, you can work with MIDI, audio, sound editing, have MIDI effects, audio effects and even instruments as plugins, and more. The learning curve for these tools is slow, but the results can be great after you get used to the interface. My background relies on this kind of sequencer. 2007 Spring includes Rosegarden, a strong tool developed on top of KDE that connects many types of plugins and has tons of resources to play with.
The good thing about this kind of sequencer is that we can do lot of things in an easy and logical way, but it takes time to learn how. Right now we want to have some fun, as quickly as possible. So let's see what other choices we have...
Finally, the new kids on the block. New style sequencers like FruityLoops and Ableton Live come with the recent trends of electronic music and tools. They're fun to play with, not as difficult as an old-style pro tool but not as easy as a simple soundtracker, visually pleasant and designed to make it relatively easy to experiment with. You get lots of features to try, from real-time editing to chain of effects and sample tricks. In 2007 Spring we have one of this style of sequencer called LMMS. This tool gives a good first impression, isn't scary at first sight, comes with some instrument samples to help newbies, and has a great interface. Take a look:
So I decided to give it a chance. It will be first time for me and in this way I can use my past knowledge of old tools to help. Now we decided what tool to use, let's see what we can do with instruments.
Tips and Tricks 2: Usually, some MIDI events need the ALSA sequencer module to be available. Sequencers usually warn users about this when the module is not available. So to enable it, run this command as root:
modprobe snd-seq-midi
Instruments
We have plenty of options - almost too many! It's easy to get lost. There are virtual synthesizers, like VST or DirectX synths on commercial tools. In 2007 Spring, you have the DSSI project. There's only a few synths available so far, but the goal is to add a layer to open source music applications to enable virtual synths like VSt synths. As a good example, you can install the xsynth-dssi available in 2007 Spring. It is possible to use VST on Linux, but I will skip this one, since it involves compiling some WINE bindings and some non-free code, and it's not stable enough and not user friendly yet. There are amazing standalone synths, like ZynAddSubFx, as well:
Listen to the sample I made just by typing on my keyboard!
Tips and Tricks 3: Remember to connect the zynaddsubfx output to the ALSA input in qjackctl for sound to work!
One thing you should be advised about using soft synths: they are resource intensive. You can easily see your system resources being completely used with just a few of these beasts running, and sounds start to become ugly until eventually everything hangs (I'm not kidding). There's still a little way to go until Linux reaches the low resource usage and low latency seen on some other systems.
The alternative approach for us will be to take some ready-made samples. And oh boy, you can find all kinds of samples around the Internet - legal free samples. I decided to get some drum dance loops, some weird samples and some sample effects to add in my little song. My sources were archive.org, where you can find tons of public domain fun audio and video resources, and freesound.org, a fantastic free sample database, where you can hear snippets included. And of course, we can create our own samples, which I will do using another nice tool in 2007 Spring, the amazing Hydrogen drum machine. Even though it's called a drum machine, Hydrogen can go way beyond this to be used as a good sample based tracker.
So, these are the elements I chose to make a 1 minute fun song:
- LMMS synth to do bass (a dumb C scale variation)
- house drum loop sample from future music collections
- an intro sample synth
- Some beeps
- and a sample from a 1930s Edson Phonograph announce as the base for all tracks!
Effects
I think that we can add some effects, at least on the beep. 2007 Spring has the LADSPA API for effects available, with which a good set of (resource-hungry) effects can be found and used by almost every audio program in Linux. So to make things easy, install the packages ladspa and cmt and you can chain all the effects you want.
The wave editor
There's one wave editor to rule then all, and its name is Audacity. It's been under development for years, and is of professional quality, with filters and everything. All the sounds I recorded, splitted and converted during this article were done in Audacity. Stable as hell, excellent configurability, just amazing.
Mixing
OK, so you really want to do a mix tape for your girlfriend (or boyfriend). And not the simple way, you want to go further. So why not try out your DJ skills? 2007 Spring has several nice tools included, but in my opinion, you should go for mixxx. No prescription needed, just pick a song (wav, MP3 or Ogg), put in one deck, play, put another in deck B, control BPM with your heaphones, push the buttons, drag the sliders and now you are your own home DJ. Well, sort of! Give the tool a try, just install mixxx and discover the fun of mixing things.
In this archive I've included all the samples, the LMMS project file, and the fun song, made in two hours including fights with interfaces and the mouse. Of course I cheated a little bit because I spent a week profiling the tools and what to include in the article to provide fast user happiness. But if you want to explore beyond the tools presented here, just run rpmdrake, and look the multimedia package section.
Tips and Tricks Final Cut: I didn't want to look at the professional level tools, but if you want to go down this path later:
- Look at Ardour as a professional audio multitrack recorder
- Investigate rosegarden MIDI and automatization abilities
- Investigate using the low-latency multimedia kernel
Written by Helio Chissini de Castro, Mandriva, under Creative Commons Attribution 3.0 Unported license
Proofread and laid out by Adam Williamson
Version 1.30 last modified by 050608-A99EB7-6946 on 20/08/2007 at 22:06
Document data
Attachments (10)
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!
Comments (4)