Installing and recording music with Ubuntu Studio

Installing and recording music with Ubuntu Studio

If you want to record music with the Ubuntu GNU/Linux system, Ubuntu Studio will make the installation of the programs needed much easier, and get you started with just a few clicks. As well as audio programs, video and graphics programs are also part of Ubuntu Studio.

Apart from a computer, the music programs installed with Ubuntu Studio and an instrument, you will need something to interface between your instruments and the computer and an external USB sound card can do just that.

Some only have one type of connection, whereas others are multipurpose sound cards, with input ports for both guitar-, microphone- and MIDI-cables.

Installing Ubuntu Studio

To install Ubuntu Studio, open the Synaptic Package Manager (System > Administration > Synaptic Package Manager) and enter your password.

Synaptic Package Manager

From Synaptic Package Manager you can install additional software. Find the desired packages by using the Quick search field. Search for ubuntustudio, left-click the checkbox for the ubuntustudio-desktop and select "Mark for Installation".

Install Ubuntu Studio

Since the ubuntustudio-desktop package has a few dependencies, a window will pop up. Accept their installation by clicking on "Mark" and the needed ubuntustudio packages will automatically be selected for installation.

Installing ubuntustudio-desktop

Select ubuntustudio-audio(all the programs) and ubuntustudio-audio-plugins(LADSPA and DSSI plugins) as well. again, accept the installation of dependencies and programs by clicking on "Mark". If you want to try out the video and graphics programs from Ubuntu Studio, you could also install ubuntustudio-video and ubuntustudio-graphics, but they are not neecessary for music production. Finish the installation by clicking "Apply" two times. At 330 kB/s, downloading took around 25 minutes.

Apply changes 1
Apply changes 2

Among the things installed is the 2.6.28-3 real time kernel, which will help getting better recordings. You will see this option next time you boot up your computer.

2.6.28-3 real time kernel is installed

After the installation is complete, a restart is required, to apply all the changes and update the system.

Restart after install

Remember to select Ubuntu 9.04, kernel 2.6.28-3-rt on the boot screen. You might want to Clean Up Ubuntu Grub Boot Menu After Upgrades since the new entry isn't selected by default when booting.

If you don't like the new login screen, open Login Window (System > Administration > Login Window) to change it. For some reason, the fonts got a bit smaller after I installed Ubuntu Studio. To enlarge the fonts, open Appearance (System > Administration > Appearance) click on Fonts, then Details and set the resolution to 132, or whatever seems like a good font-size to you.

Enlarge the fonts

The installed programs are available via the new menu Audio Production (Applications > Sound & Video > Audio Production)

New menu Audio Production

Connecting instruments and computer via USB

I use an Edirol UA-25 USB Sound Card from Roland, with multi-input ports for both guitar-, microphone- and MIDI-cables, to hook up my electrical guitar, bass and microphones. It was detected automatically by Ubuntu 9.04 when I connected it, but I disabled the on-board sound card to avoid conflicts. To disable the Intel Sound Card on my laptop, I entered the following in a file called blacklist:

sudo gedit /etc/modprobe.d/blacklist

# turn off internal soundcard
blacklist snd_intel8x0
blacklist snd_ac97_codec
blacklist snd_ac97

After reboot, I set the device settings to Autodetect under Sound Preferences (System > Preferences > Sound) making it the default sound device.

Autodetect Sound devices

While I was messing with the sound settings, I disabled all system sounds, clicks, start music, etc.

Disable system sounds

Connecting JACK and Ardour

To connect the music recording programs, allowing them to talk together, you need to start the JACK Audio Connection Kit, called JACK Control (Applications > Sound & Video > Audio Production > JACK Control).

JACK acts as a gateway between the input from the instruments and the music programs, like Ardour, Hydrogen (Drums) and Rakarrack (Guitar effects), and needs to be running in order to make everything work. When JACK is running, all other sound output from the computer is disabled, so it is not possible to listen to music with amarok, view youtube videos, etc.

Start JACK Control

Under JACK Setup, the following Parameters work well with my laptop. I found out I had to set Input device and Output device to hw:1 in stead of the default hw:0, by typing the following in console:

aplay -l
arecord -l

If the DSP load freaks out (the number followed by a percent sign) you might want to disable Realtime, getting more RAM might also help. Connect your guitar to the Input 2/R on the Edirol sound card, or whatever you use to connect your instrument with, and confirm you have sound in your speakers or headphones.

Setting up JACK

When JACK is configured, go to Misc and check "Start JACK audio server on application startup" and "Enable system tray icon", just to minimize the taskbar from filling up. For some reason the Close JACK option(the little cross in the upper right corner) isn't shown in this installation, only minimize and maximize.

Start JACK audio server on start up

Recording with Ardour

To start recording, make sure that JACK is running, and open up Ardour (Applications > Sound & Video > Audio Production > Ardour GTK), name your song and click New.

Record with Ardour

If you try to play something on your guitar it wont be picked up by Ardour, since JACK and Ardour are not yet connected. This can also be seen by the level meter next to master track not reacting if you play something on your guitar. To connect them, open JACK's connections patchbay window by clicking on Connect, select "system" in the left window and "ardour" in the right window and click "connect". You should now see a red line connecting them.

Connect JACK and Ardour

Close the connection window and check that the level meter next to the master is reacting when you play your guitar.

Check the master level meter is active

To create a new track, right click in the space below the master track, click "Add" and call it "lead guitar" or something meaningful. This really helps when there are a lot of tracks to keep track of!

Create a new track

Tracks in Ardour

To set up the connections to the track, open up the Track/Bus Inspector (Window > Track/Bus Inspector), select guitar track in the left window, click on "system:capture_1" under "inputs" to remove it. Now click on Add Input, click on "system" under "connections" to the right and click on both "system:capture_1" and "system:capture_2" to get this result as seen in the image below. Click on the red recording button in the guitar track and confirm the level meter reacts when you play your guitar.

Connecting the tracks with the Track/Bus Inspector

To start recording, press Shift+Space, press Space to stop recording. Use the Left and Right arrow keys to move the Timecode indicator(called Playhead) and Space to start playing what you just recorded. Move the Playhead 5 seconds by pressing Alt+Arrow key.

From the track mixer (Window > Show Mixer or Shift+E to show the highlighted track on the left) you can do a lot of things, like change the volume of indidual tracks, tweak the panning for both channels and add Plugins (right-click below the "record button") to add interesting effects to the individual track. There are a lot of effects included in the Ubuntustudio package, so start experimenting!

Add Plugins to tracks

Exporting a song

When your masterpiece is finished, set the Playhead where the track ends, right-click the yellow end marker, probably at five minutes and select Move Mark to Playhead and export your recording (Session > Export > Export to audiofile).

Exporting a song

You now know the basics of recording music with Ubuntu, although this merely scratches the surface of the full potential of the programs. Other than Ardour and JACK, the Ubuntu Studio package comes with a lot of other fantastic programs, like Hydrogen for drum programming and JAMin for mastering your recordings to perfection.

For some reason the best Guitar Effects Processor for Linux, Rakarrack, isn't included in Ubuntu Studio, which is a real shame. It can be found on the internet though, just search for Rakarrack and deb, for compiled versions of the program. The "correct" way of adding guitar effects is via Plugins under Ardour, since it will allow you to alter the effects afterwards. But sometimes you just need some grungy sounds, which Rakarrack does very nicely.

March 2012: Guitarix is another Guitar Effects Processor for Linux. The Ubuntu Lucid installation link on the Guitarix site (http://guitarix.sourceforge.net/index.php?page=3) leads to http://launchpad.net/~falk-t-j/+archive/lucid/ which is no longer supported. But there is a link to the new repository, https://launchpad.net/~kxstudio-team/+archive/ppa/

To add the repository to your system, and install guitarix in ubuntu lucid, open the terminal and run these commands:

sudo add-apt-repository ppa:kxstudio-team/ppa
sudo apt-get update
sudo apt-get install guitarix

During installation it asked if I wanted to keep an original Jack file or overwrite with a new one, the only difference was rt-prio was set to 95 in stead 0f 99, so I chose to keep it.

Comments

My ubuntustudio is under construction. Ich habe genauo eine Card Edirol UA-25 bestellt. My bass and Hydrogen drum machine input sound wollte ich mit Ardour record.
Thank you very much for the Roland card suggestion.
Ich freue mich ├╝ber das soundstudio engineering

I recommend to take a look at guitarix. A fantastic Guitar Effects Processor for Linux. SG, ad ;-)

Thanks for the Guitarix tip, I finally tried it today, and it is great! The way you can build your own rack is very user friendly, and the sounds are good too.

Connecting it is a bit harder than Rakarrack, but this will do the job: http://www.timelordz.com/blog/wp-content/uploads/2011/12/JACK-Guitarix-Connections.png

I had to use "capture 2" under system, because my Edirol sound card uses "INPUT 2/R" for guitars.