Introduction: Semi-live Software Music (nothing Other Than a Computer Required)

You may have looked longingly at the expensive synthesizers that you can find in shops, and wished you had the disposable income to afford them. I mean, playing with sound is great fun isn't it?

Fortunately, today's computers are powerful enough to be able to do software sound synthesis, and so long as you're fine with not playing more than two or three notes at a time, your computers keyboard can work just fine. This means that for zero cost, you can have some of the fun that you'd get out of a several thousand dollar system. Yes, there are several things that you can't do without hardware, and turning knobs is way more fun with your fingers than with a mouse, but most of us don't have the money or space to be able to buy the gear.

This ible will show you one way in which you can use a free and open source software stack to create semi-live music. What do I mean by semi-live? Well, as you play each track it is recorded as audio data, and you will use multiple track to create songs. In doing so we will set up JACK audio system, which is designed to provide low latency audio. I've attached some two 40 second tracks I made using this method. They were composed and 'performed' in about half an hour each.

What you need:

  • A Linux Computer (unlikely to work on windows or mac, but I suppose it may)
  • Musical Ideas
  • A pair of headphones is useful
  • Possibly a few geek skills for troubleshooting

Step 1: Installing Software

You will need the following software:

  • audacity
  • lmms
  • guitarix
  • qjackctl

And maybe the following utilities

  • pasuspender (Only if needed. If you haven't tweaked your audio system, then you almost certainly need this)
  • jackd (should have been auto-installed by qjackctl)

If you're new to the linux world, you can probably get these packages from your software store. If you're a geek like me, it's probably faster to type in a terminal something like:

sudo apt install audacity lmms guitarix qjackctl pasuspender

sudo pacman -S audacity lmms guitarix qjackctl pasuspender

The picture shows how most of these pieces of software will be interacting. LMMS generates sounds, Guitarix distorts them, Audacity records them. This is all possible because Jack allows routing sound from one application to another.

Step 2: Who/what Is Jack?

Jack is the system we will use to connect all our applications together (it stands for JACK Audio Connection Kit). We want to get our audio source (lmms or the microphone) through to audacity for recording. We may also want to apply various effects to it with guitarix. Jack gives us a way to route audio from one application to another however we chose.

Staring Jack, and using qjackctl

Most modern linux systems use a system called pulseaudio to allow multiple applications to output to the sound card. Unfortunately getting jack to co-operating with pulseaudio is an exercise in frustration. Fortunately there is a program called 'pasuspender' which is the "pulseaudio suspender." It will allow us to stop pulseaudio from running while we are running jack. So to kick things off, run:

pasuspender -- qjackctl

This will pause pulseaudio and open qjackctl (a graphical interface for configuring jack). If all goes well and good, you should be able to click the "Start" button in qjackctl, and no error messages pop up. If there are error messages you may have to select your sound card in the setup window. If you still can't start it, make sure that you started qjackctl using pasuspender.

Step 3: Linux Multimedia Studio (LMMS)

What is LMMS

LMMS is the "Linux MultiMedia Studio" and it is generally used for composition. As such, it includes a score editor and lots of other things. We'll just be using it as a good way of accessing software synthesizers. It comes with a huge range of software synths. The ones I tend to use are

  • A simple "Triple Oscilator" - great for "synthy" synths
  • ZynSubAddFX - very versatile but very complex
  • Kicker - For drums, snares and other percussive sounds
  • An audio sampler - if you have samples of a particular instrument
  • BitInvader - for simulating 8-bit sounds

Configuring LMMS to use JACK

Many applications come with support for Jack, but default to using pulseaudio. Because we're now using Jack, we have to tell the application this.

As a result, you need to go Edit -> Settings -> Audio Interface and change the interface to "Jack (JACK Audio Connection Kit". Then you'll need to restart lmms

Connecting LMMS to your speakers

Chances are that if you try and play something in LMMS, you won't hear any sound coming out. This is because we haven't told JACK what to do with the output from LMMS. We need to tell it to output to the systems speakers. To do this, go to the qjackctl window and open the "Connections" window (1). You will then need to select the readable source "lmms-01" (2) and the "writable client" called "system" (3). Then hit the "connect button" (4).

A line will appear, joining lmms to the system. Play around with connecting and disconnection applications. This process is what allows us to record the instruments, pass them through filters and so on.

A brief introduction to LMMS

We are going to be using LMMS to generate sounds, and as such we need to know how to add synthesizers and play them. The easiest way to add a synthesizer is from the preset list. This is an icon on the left (star symbol). From there you can browse the presets, and then drag and drop an instrument into the instrument window.

Once you have an instrument in the project, you can click on it's name. This will open the instrument editor. When the editor is open you can "play" the instrument using your computers keyboard. Two octaves are available. "QWERTYUIOP{}|" and some of the numbers provide just over one octave, and "ZXCVBNM<>?" and some of the asdf row provide a lower octave. If you've every played a piano, it's laid out like that. So the pattern of semitones on the lower row is: "zsxdcvgbhnmk,l.;/". Eh, just try it and see.

I suggest fooling around with the presets and finding the ones you like....

If you suffer from pressing and holding a key causing the note to play multiple times, you can open a terminal and type:

xset r off

Which will disable repeat keys until you reboot or run "xset r on"

Step 4: Audacity

Audacity is the program we will use for recording. I believe Ardour is a "better" solution for serious people, but I have not learned how to use it yet. As a result, Audacity.

Configuring for Jack

Just like with lmms, we need to tell audacity to use Jack. This time it is available up the top of audacity. From that bar you can select the input source within jack, as well as set where the output is going. Unfortunately audacity doesn't support the jack transport protocol, so we can't use the qjackctl connect window for this.

We also need to tell audacity what the bitrate of Jack is. If we don't do this you'll get occasional pops and crackles in the sound. This is because jack tries to keep the audio synchronous between applications. As a result, you need to find the bitrate from qjackctl and set it in audacity. Jacks bitrate can be read from the qjackctl setup window, and you set it in audacity down the bottom left.

In order to keep our tracks aligned when recording multiple times, we should tell audacity what Jack's latency is. This can be done under audacity preferences (Edit -> Preferences).

Recording from lmms

Have a go at recording from lmms. So up the top of audacity make sure "lmms" is selected as the source in the top left. Then hit "record" in audacity and start playing some notes in LMMS. With luck you should see the waveform appearing in the audacity window.

Step 5: Guitarix

Guitarix is a bank of guitar pedals and wave-form-filters. It is far more versatile than what is available in LMMS, or audacity.

Guitarix uses jack by default, and appears in the connect window as two entries starting with "gx". In the screenshot I've got the microphone (system) and the output of lmms redirected through guitarix. I have guitarix outputting to the speakers. To record the output of guitarix, change the input source to gx_head_fx up in the top left of audacity (see the previous step).

It's great fun whistling with some distortion, or turning the reverb up high and then hitting things in the room around you. I've uploaded an audio file of me whistling as filtered by guitarix. Using a compressor on a whistle keeps the volume consistent, but whistling in tune is pretty much impossible.

Step 6: Creating a Multilayered Song

First off lay out a click track of the temp you want. This can be done in Audacity where you do "Generate -> Rhythm Track" and select the BPM and a bunch of other parameters.

Typically I'll then record a baseline on top of it, followed by harmony, then drums and finally a melody. At this point, now that you know how to generate sounds and record them, it's up to your musical ability. My basic process is to pick an instrument, twiddle with filters in guitarix, and then record a track. Then I rinse and repeat until the song is as "done" as I can be bothered making it.

Tips:

  • Before you start, make sure that your audacity project is set to the correct latency (as per the audacity step). Unfortunately this is a per-project setting so it doesn't stay changed.
  • Make sure you're recording from the right source - either guitarix, the microphone or lmms. If you pick the wrong one then you'll have to play through that track again.
  • If you're doing all improv, It's easiest to do the bassline, then the harmony, then the melody and finally the drums.
  • Leave two bars of click track before starting to record your music. This means it's not a panic to get from one window to another.
  • Open audacity next to LMMS. Have guitarix behind audacity, have the patchbay behind lmms.
  • You may have to twiddle the latency factor. Using the latency from Jack is a good starting point, but you may have to increase it to accommodate for LMMS's latency...

Step 7: Where to From Here?

Uisng a midi keyboard instead of your computers keyboard will prevent keylock issues (on a normal keyboard you often can't press more than 2 or 3 keys at a same time). It is also likely more intuitive for those who have played piano before.

You can also install other applications as sound sources and effects. For example there is sooperlooper allowing you to do multilayer tracks in (in theory) a single pass. However I found co-ordinating with it very hard. I think you need some physical system (eg MIDI) to drive it to make it practical. Also worth looking at is Hydrogen drum machine. Have a look at the list of applications over at the jack website.

I find it nice to include some real samples (eg whistling) because you can't include volume and pitch bending from a computer keyboard.

Comments

About This Instructable

541views

9favorites

License:

Bio: All you need to know is I exist......
More by sdfgeoff:Semi-live Software Music (nothing Other Than a Computer Required)Botch Bread #1: Flatbread/wrapsBotch Chocolate (Super Easy, Super Good, Super Cheap)
Add instructable to: