Recording music with Linux on an EEE PC

While an Asus EEE PC is perhaps not best suited for full-on intensive music production, it does have values which make it an ideal solution for portable recording.

eeepc_mic_linux

EEEPC and Shure SM57

This tutorial will show you how to install and setup a linux recording environment on your EEE PC or other netbook, for the purpose of mobile audio recording and audio sampling.

I am using an Asus EEE PC 901 with 4GB and 16GB SSD’s (that comes with Xandros Linux pre-installed) but this method will work for other models of EEE PC’s and netbooks, even those with Windows pre-installed.

This is not meant to be an advanced guide for those already involved in Linux audio recording but should hopefully be a handy introduction for beginners who want to turn their EEE PC into a mobile recording machine at no cost.

Installing

There are some excellent Linux distributions for full desktop (and laptop) audio production, (64 Studio, Ubuntu Studio e.t.c.) however we are going to use and slightly modify the Ubuntu Netbook Remix distribution for our needs.

As the netbook has no built-in CD drive, unless you have an external CD drive, you will need to image a USB key or SD card with Ubuntu Netbook Remix in order to install the Operating System.

So first of all head over and download the image file for the latest version of Ubuntu Netbook Remix.

There is also a simple guide that will show you how to easily make a bootable USB key with the .img file you downloaded.

Once you have downloaded the file and imaged you USB key, it is a simple matter of booting your eee pc with the key attached and pressing the Esc key just after you turn the machine on, at the BIOS screen. This will enable you to choose to boot from the USB drive.

Hydrogen on the EEE PC

Hydrogen on the EEE PC

Alternatively, you could press F2 instead of Esc and change your boot device order in the BIOS settings.

In a short time you will be presented with an options screen where you are able to choose between booting into Ubuntu in Live CD mode or installing straight away. It does not matter greatly which option you choose, as you are also able to install the Operating System from Live CD mode.

Installation is a simple matter of following the on-screen instructions and setting your options.

Probably the most important part of the installation and the point at which you should make sure you are paying attention is when you come to the disk partitioning screen, as this is where you can choose where Ubuntu will be installed on your disk.

If you are running Windows and would like to keep your Windows install as a dual boot, you will have to resize one of your partitions to make space for Ubuntu.

I personally would rather chew through my arm than run Windows so here is how I setup my disks using the manual partitioner :

  • 4GB SSD (/dev/sda) : 3.5GB ext3 root + 220MB swap (optional)
  • 16GB SSD (/dev/sdb) : 16GB ext as /home

This puts Ubuntu and swap on the faster 4GB SSD and my /home folder on the slower but larger 16GB SSD.

Once you have chosen your partitions continue with the installation and when it is finished you can remove your USB key and reboot when prompted.

The installer will have installed the GRUB bootloader – If you are dual-booting with Wiindows or another OS you may need to choose to boot Ubuntu at the boot screen.

ASUS 901 WPA2 Wifi fix

At the time of writing there is a regression bug with the latest version of the driver for the rt2860 wireless card on my 901 EEE PC; depending on what model of netbook you are using and your wireless Access Point setup, you may or may not encounter this bug relating to certain WPA2 encryption settings.

If you do encounter the problem, you will need to either temporarily change your Access Point encryption settings or use the wired connection to connect to the internet and do a simple downgrade of the driver is required as follows :

Install dkms – At a terminal type :

sudo apt-get install dkms

Next, rename the existing driver so that it is not loaded :

cd /lib/modules/2.6.28-11-generic/kernel/drivers/staging/rt2860/
sudo mv rt2860sta.ko rt2860sta.bak

Then you need to download and install this .deb version of the dkms driver for the wifi card.

After installing the driver, reboot your EEE PC and WPA2 connectivity should be fixed.

Realtime Kernel

One thing you’re certainly going to need if you want to make music with your netbook is a realtime kernel.

A realtime kernel allows for lower latency communications between software and hardware. It is useful in audio production cases as otherwise you can run into ‘xruns’, which are buffer over/underruns, where the application is too slow to process the data from the audio buffers. In your recording you would hear something like clicks and pops and other weird noises when you get xruns.

Realtime kernel packages are available in the Ubuntu repository, to install one run this in a terminal :

sudo apt-get install linux-rt

Or find the linux-rt package in the synaptic package manager.

Once you have downloaded the realtime kernel, you can choose to boot into the realtime kernel at the grub boot menu at startup.

Or, if you want to boot into the realtime kernel (or Windows if you are dual-booting) by default you can set this in /boot/grub/menu.lst

Linux recording programs installation

At this point you should have a working Ubuntu install on your netbook with a realtime kernel. We are almost there and it is time to grab the applications we will use for recording and editing our music.

There are a wide variety of music creation applications available in the repositories that allow you to create music in many different ways.  I would advise you to try out some of the other applications as well, but I’m going to recommend a few of the most popular applications that will allow to you to record, edit and manipulate audio, create drum loops and add some effects to your recordings.

These applications are :

  • jackd – Jack Audio Connection Kit (depends on libjack0)
  • qjackctl – Graphical User Interface for managing jackd
  • ardour-i686 – Definitely one of the best and most versatile DAW’s available for Linux
  • Audacity – Audio/.wav editor
  • Hydrogen – Drum machine/step sequencer
  • hydrogen-drumkits – extra drum kits for Hydrogen
  • Creox – real-time effects suite
  • Ecamegapedal – another real-time effects suite
  • cmt – Computer Music Toolkit ladspa effects plugins
  • caps – ladspa effects plugins by C* Audio
  • swh-plugins – ladspa effects plugins by Steve Harris
  • tap-plugins – ladspa effects plugins by Tom Szilagyi

You can locate and install these programs in the synaptic package manager manually or run the following in a terminal to install :

sudo apt-get install jackd qjackctl ardour-i686 audacity hydrogen hydrogen-drumkits creox
ecamegapedal cmt caps swh-plugins tap-plugins

Audio interfaces

With an EEE PC, there are at least two ways you can record audio into the system :

a) Using the built-in soundcard

b) Using a USB audio interface.

A USB audio interface offers the best sound quality as it will typically feature balanced XLR inputs, quality pre-amps and 48v DC Phantom Power, allowing you to use condenser microphones.

With the built-in soundcard you will have to use the built-in stereo microphones, or plug a dynamic microphone into the microphone input of the netbook. With this method you are sacrificing some sound quality but gain portability and increased battery life – as when mobile recording, the usb audio interface will be drawing power from the EEEPC’s battery.

In this tutorial I am going to use the built-in sound-card with a dynamic microphone plugged into the microphone port with an XLR to mini jack cable, but the steps are more or less the same whichever method you use.

Setting up JACK

JACK is the system on top of which we will be running nearly all of our audio programs, so it is important to get its setup correct for the best performance of the audio system.

We need to setup realtime priorities for the audio group, so enter this at a terminal :

echo '    @audio     - rtprio 99' | sudo tee -a /etc/security/limits.conf
echo '    @audio     - memlock 512000' | sudo tee -a /etc/security/limits.conf
echo '    @audio     - nice -10' | sudo tee -a /etc/security/limits.conf

This sets a realtime priority and nice value for the audio group and gives the audio processes a locked amount of memory, in this case 512000 being half of the EEE PC’s stock 1GB of RAM. If you have added more RAM to your netbook you can increase this figure, or even set it as unlimited.

Then we need to add our user to the audio group. Enter this at a terminal, replacing ‘YOUR_USERNAME’ with your actual username :

sudo adduser YOUR_USERNAME audio

Next you can open JACK Control and configure it using the ‘Setup’ button, here is how I have setup JACK Control (click for full-size) :

Jack Audio Connection Kit

JACK Control settings on the eee pc

Once you have configured your settings here you can press OK and start JACK by pressing Start.

Your system is now configured and ready to start recording. Remember to start JACK with JACK Control when you want to use Ardour, Hydrogen e.t.c. in the future.

In the next part of this series of posts I will show you some good music production uses you can get out of this setup.

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Reddit
  • FriendFeed
  • StumbleUpon
  • Twitter

Tags: , , , , , , , , , , , , ,

35 Responses to “Recording music with Linux on an EEE PC”

  1. Gary Judge says:

    Interesting article. I have done some similar tests / work on my windows xp netbook with ableton live. Its amazing what these little machines are capable of:

    http://www.klunk.org/archives/224
    http://www.klunk.org/archives/182

  2. Sam says:

    Hi there, great post. Have linked to you from my blog covering music technology amongst other stuff. Look forward to reading more of your posts!

  3. noswagger says:

    Thanks for putting this together. Have you had any issues with the real time kernel? I tried this out and every time I boot up the rt kernel the system ends up freezing.

    • ouistiti says:

      Oh, how strange…
      I haven’t had any problems with the real-time kernel really – I had a JACK crash when running a lot of simultaneous effects at too low a latency but that’s all –
      What netbook are you using? An Eee PC or something else? Does the system freeze at start up or after a while? I’d be happy to try to help you if you can give some more details, logs would be good too.

  4. noswagger says:

    I’m running an eeepc 1000he. It has frozen at a couple of different spots. It froze several times at the terminal when I was trying to download the audio app packages and it most recently froze right after boot up when wifi was trying to connect.

    How can I pull the logs for you to see? I’m a huuuuuuuge linux noob.

    • ouistiti says:

      Ok it does sound a little like it might be a problem with the wifi, I should have mentioned in the article that I am using eee-control from http://greg.geekmind.org/eee-control/ to switch hardware on and off. I have bluetooth disabled in BIOS and disable wifi when I’m recording in the real-time kernel.

      You can view log files in Administration > Log File Viewer and the actual logs are stored under /var/log/
      The files of most interest in this case are probably /var/log/messages /var/log/debug and maybe /var/log/kern.log

      A problem with lockups of-course is that if the lock-up is severe enough that machine stops writing to disk, it won’t write a log of the crash either.

      It would be best if you can try to view / capture the logs directly after the machine freezes. Next time it freezes (it sounds like it is locking completely and responds to no input, correct?), Try to note the time of the freeze (logs are timestamped, easier to find what was going on before freeze) and try the following :

      Press (and continue to hold down while you press the other keys) Fn + Alt Gr + Del/Sys Rq and then press R E I S U B.

      I know it sounds like some sort of funky magic spell but hopefully it should cause your machine to reboot cleanly.

      Then as soon as the machine comes back up, go to a terminal and making a copy of the logs using :
      cat /var/log/kern.log > kernel_log.txt
      for each of the log files I mentioned above.
      This will write the log to a file in your current directory (probably /home/username/) which you can upload somewhere/put on an online pastebin or something.

  5. renux dnb says:

    I notice that LMMS was not mentioned,

    I use debian stable and the ardour is not available thus I use lmms for the same purpose,

    please check the highlinux.com for some results for my experiments

  6. _k says:

    Hi,

    Just a tip. Someone gave me this a while ago:
    If using USB, period/buffer should be set to 3 in Jack settings.

    Cheers

    _k

  7. rob enderle says:

    There are some excellent Linux distributions for full desktop (and laptop) audio production, (64 Studio, Ubuntu Studio e.t.c.) however we are going to use and slightly modify the Ubuntu Netbook Remix distribution for our needs.

    I dare you to name me another Linux desktop that specializes in audio prod.
    ah hell, I dare you to name me any distro that doenst start or end with a U.

    • ouistiti says:

      Do I look like a dancing bear to you?
      ah hell, go on then – Planet CCRMA is pretty good, dyne:bolic, jacklab, I heard transmission can work quite nice on netbooks too but there are plenty of others…
      and for your second question, well Fedora, Mandriva, Gentoo, Arch, Slackware to name but a few….

      Now, I dare you not to be a Linux elitist cock-muncher.

  8. Matt says:

    For simple recording feats, are you sure you need low latency, in my experience latency achieved without using rt is satisfactory for most uses and more importantly avoids all the issues with ubuntu’s abysmall (in my opinion) implementation of the rt kernel.

    Just food for thought.

    Matt

  9. Epicanis says:

    I’m (probably excessively) paranoid about putting a swap file or any other frequently-written data on the solid-state drives, for fear of burning them out prematurely. So far I’ve happily found I have no need for a swap file – I paid a little extra when I got my Eee901 to get a 2GB RAM upgrade, and set up /tmp as tmpfs. (Perversely – the kernel I originally loaded was tuned for the Eee901, including being limited to the original 1GB RAM. I think it’s a testament to how efficient linux is that I ran it this way for a month and never noticed, until I got curious why “free” kept reporting only 1GB …)

  10. Holy crap! Talk about thinking outside the box. Love the pictures, and despite being a Windows user (myself), I understand where you’re coming from. Maybe I’m just lacking experience in this field, when I say that I don’t think your idea is likely to take off, but you’ve made a poignant statement. Anything is possible, and you certainly have the ambition and brilliance to prove it.

  11. cojusib2ojepi@gmail.com says:

    The style of writing is quite familiar to me. Have you written guest posts for other blogs?

  12. Justin says:

    I just followed these instructions and it corrupted my XP install, i get a registry error and it shuts down every time i try to boot to XP

  13. Paul Colby says:

    Great use for an Eee PC! :)

    Just wondering (and I can’t seem to find anywhere else), what recording rates are supported by the Eee PC? (or at least your model?). eg 16-bit @ 44kHz? 24-bit @ 96kHz? The Intel HD Audio chip the Eee PCs use supports up to 32-bit @ 384kHz (wow!!) but I doubt anyone’s implemented such a high rate with those chips.

    If I get my hands on an Eee PC sometime I’ll check it out for myself, but in the meantime, it would be cool if you could have a quick look for me :)

    thanks!

  14. Javier Martinez says:

    Hi! Great post and very usefull! I own a home recording studio and a Asus eeepc (4G) with Ubuntu that have only used for ofimatics. If I could use it for recording it would be awsome, even if I would have to buy an external USB soundcard (that I think would be the best option). Any way, my answer is: Have you tried to install Ubuntu Studio in the Eee Pc? What is the difference between doing all this stuff you recommend here and installing Ubuntu Studio that is only 1.4 Gb (at least the ISO image)? Thanks!!

  15. Eduardo Sztokbant says:

    Thanx for this article!!

  16. Excellent – thanks for these step-by-step instructions!

    You might consider adding jackd as a service at boot. Open /etc/default/jackd in a text editor, change “START_DAEMON=no” to “START_DAEMON=yes” and save.

  17. You write awsome article, bookmarked

  18. 2046 says:

    Thanks man for the manual ;)
    I behalf of you work, and also because I like your music I have put one of yours songs on our online radio http://monkeyontheorb.org

    btw. in my case I use Asus T91, because it has touch screen, so I do not have to use the annoying mouse ;)
    thanks again 2046

  19. 2046 says:

    hello again,

    Don’t you suffer from noise?
    I have a noise anytime I run any sound app and the sound modul wakes up :(
    I have tried many realtime kernels, but still, the noise is there.

  20. jegathees says:

    hi, I intalled unbuntu to my eeepc, but i could not play mp3 songs with media player.
    can anyone help me. thank you for this useful blog.

  21. Irwin Diebol says:

    Hello,this is Irwin Diebol,just identified your Blog on google and i must say this blog is great.may I share some of the writing found in the site to my local students?i am not sure and what you think?in either case,Thank you!

Trackbacks

 
  1. [...] Recording music with Linux on an EEE PC While an Asus EEE PC is perhaps not best suited for full-on intensive music production, it does have values which make it an ideal solution for portable recording. [...]

  2. [...] music with Linux on an EEE PC. This tutorial will show you how to install and setup a linux recording environment on your EEE PC or other [...]

  3. [...] Recording music with Linux on an EEE PC : Toujours avec l’Eee Pc, que l’on transforme ici en parfait système pour la prise de son (par exemple pour partir jouer les reporter radio en herbe). [...]

  4. [...] you’re hauling your outfit the last thing you want is more weight. Check out this article on recording music with Linux on an Asus EEE. I recall that some time ago banks were just giving these away if you opened an account. I have use [...]

  5. [...] Recording music with Linux on an EEE PC : Toujours avec l’Eee Pc, que l’on transforme ici en parfait système pour la prise de son (par exemple pour partir jouer les reporter radio en herbe). [...]

  6. [...] you’re hauling your outfit the last thing you want is more weight. Check out this article on recording music with Linux on an Asus EEE. I recall that some time ago banks were just giving these away if you opened an account. I have use [...]

  1. popurls.com // popular today…

    story has entered the popular today section on popurls.com…

Leave a Reply