I came across by chance in what I consider one of the more comprehensive guide to creating audio in Linux, and Stefano gave me the permission to republish his material that I consider really good and that he uses as musician.
Stefano it’s an Ubuntu user and his guide it’s based on this distribution, he’s really active in the Ubuntu italian community, if you want to make him a question regarding his guide, you can post in this thread http://forum.ubuntu-it.org/index.php/topic,278719.0.html, the language of the forum is Italian, but i’m sure that you’ll get some answers also if you ask kindly in English.
This is part 1, i plan to republish the whole guide in 4 parts in the next days.
The original article is in italian, if you have any comment about the translation, contact me.
These instructions are for Ubuntu 10.04 and 10.10 (Lucid Lynx Meerkat and Maverick). Both 32 and 64 bits.
If you have not already done so, we must add the Medibuntu repository.
sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get -q update; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get -q update
sudo apt-get dist-upgrading
Finally, install proprietary codecs and other things that can be used:
sudo apt-get install ubuntu-restricted-extras non-free-codecs w32codecs libdvdcss2 fusion-icon
If you have Ubuntu 64-bit, write w64codecs instead of w32codecs.
If it asks you things with a dialog box, you have to press “OK” or “Yes” using the TAB key on the keyboard (the one next to the letter Q) and then press enter.
In addition to the codec, you now also have Fusion-Icon. It is a program to deactivate and reactivate the 3D desktop effects, on the fly, in the case that some programs do not work with 3D effects (rotating, cube etc.). To start Fusion-Icon, go to Applications → System Tools → Compiz Fusion Icon. You will see a blue icon in the upper right. By right-clicking, select “Select Window Manager”.Choosing “Metacity” disables 3d effects on the fly, if you choose “Compiz” it will be reactivated.
2. Installing the RT kernel
NB: If you have Ubuntu 10.10 (Maverick Meerkat), proceed to step 3
But now we have to to do a strange thing … You should know that when you use MIDI with Windows you actually miss many small “beats” because the Windows kernel prefers to give priority to certain processes and programs rather than the music and then anything can “jump” while making music. Which is also good to make a piano bar, but not if you have to do a professional recording. That is why there are “Asio” drivers that will lower the latency of the sytem but then will not allow you to carry out “server” activities, until the “Asio” drivers are uninstalled/disabled.
The Linux kernel in Ubuntu (not the Ubuntu server) and Windows are a cross between a server (high latency) and music (low latency). A great choice for everyday applications, but if you do not have at least a dual core (in this case the difference is imperceptible latency), the choice is bad for both server applications and for music applications. To activate a version of the Linux kernel that is appropriate to make music we have to load a different kernel, created for that purpose.
2.1 – Installation
sudo apt-get install build-essential linux-rt
If it asks you to reboot do not do it.
Then, you should already have the following but you never know:
sudo apt-get install linux-headers-generic linux-headers-rt
Still don’t restart the system if asked to do so. First we need to give permission to users to use the advantages of the Low Latency kernel.
2.2 – Change limits.conf
sudo gedit /etc/security/limits.conf
and before the line “
# End of file ” add these lines:
@audio - rtprio 99 @audio - nice -10 @audio - memlock unlimited
Save and close the file.
2.3 – Assign permissions for the use of low-latency kernel
You now have to add permissions to manage your sound card:
- System → Administration → Users and Groups
- Click on your user, “Advanced Settings” and enter the password.
- Go to “User Privileges” and select “Use audio devices”
Then you have to reboot.
2.4 – Using and troubleshooting
You have not done anything definitive: when you start your PC by pressing ESC you can choose to start with the kernel “music” or what you had before. from Karmic release,Shift must be pressed instead of ESC .
If the RT kernel does not work well and your PC is fairly new (a dual core for example) the fact that you installed it is enough to perform the minimum functions, although you’ll surely encounter difficulties when you’ll want to have very low latency (multiple records with many effects, for example). If your PC is powerful enough and you do not expect too professional results, use the generic kernel as well. Jack thinks he’s using the RT kernel and does not complain.
In this post of Corsair there are some tricks to solve the problems that often arise when installing the RT kernel on PC graphics cards with proprietary drivers (Nvidia and ATI):
http://corsairtux.blogspot.com/2009/03/installare-dirver-nvidia-e-ati-su-linux.html but remember to enter in the recovery mode rt kernel, not the generic kernel.
If all else fails, you can always go back starting with the previous kernel (by pressing ESC at the grub menu your PC, or Shift by Karmic on ). And if that fails there is always the further possibility of putting back the open driver : start with the generic kernel in recovery mode, and when it asks tell it to reconfigure xorg and everything else. It will start well in graphics, but without the proprietary drivers from Nvidia or ATI, which you can reinstall as you did before.
On Karmic and Lucid installation is incredibly smooth. DKMS takes care of recompiling the nvidia modules, virtualbox and everything else directly during the installation. Perfect.
3. Install the program and adjust the volume
3.1 – Software Installation
We install the required software:
sudo apt-get install ubuntustudio-audio ubuntustudio-audio-plugins lmms hydrogen-drumkits lingot rezound sweep fluid-soundfont-gs ams csladspa jokosher gmorgan wine jack-rack rosegarden qtractor nekobee
On Maverick (Ubuntu 10.10) add to the list this software as well:
sudo apt-get install dssi-vst zynjacku rakarrack blepvco vocproc
It is likely that on Maverick (Ubuntu 10.10) you are asked some things about Jack2. You always answer yes, moving with the arrow keys and with the Enter key.
Among the many things that you get you’ll find:
- Rosegarden is the equivalent of Cubase, Cakewalk, Sonar, Finale … It is also more powerful and configurable, and it’s free.
- Ardour is a recording studio, very very powerful. It is truly extraordinary for audio recording. here you can find a good tutorial to use it .
- Audacity is an excellent audio editor, also available for Windows. Does not support Jack.
- Qtractor is like Ardour. If you like it use it.
- Bristol is an emulator for all the wonderful sounds of all different Moog (and more)
- Nekobee is a nice emulator for Roland TB-303
- Jokosher is more or less the same thing of Audacity, but has nicer interface for gnome, very very user-friendly and does not exist for Windows. It seems like Ardour, but does not support Jack.
- Sweep is another audio editor, not multitrack , it can be convenient because it is very simple.
- Rezound is another non-multitrack audio editor, simple and colorful. I use it as default for editing audio tracks in Rosegarden.
- Gmorgan allows you to capture audio “live” from an external keyboard while the computer shoots out an arrangement with the style you want. Also useful as arranger style like Band In a Box .
- Qsynth is a program that allows you to take the sounds of instruments and use them with effects and volume, turning a sound file of musical instruments in a rack module emulated by software. Essentially, it’s the same as my Korg. Even if you have a rack module or a cool keyboard full of sound, install Qsynth anyway , it is always useful, and doesn’t do just that, does a thousand other wonderful things.
- Jackd is the heart of everything and is a patch bay, that is, a program that shows you all the entries and exits of all the programs you have loaded and the sound card that you can connect graphically . That is, it’s like a little box that connects all the cables from your instrument, with combinations done like a mad scientist (Actually by a mad musician): the dream of every musician …
- Qjackctl is a graphical interface to jackd
- Hexter is a VST, which is the software imitation of a device that produce particular sounds. In this case, the perfect imitation of the Yamaha DX7, that mythical ’80s keyboard that has become famous for the sound of “The Final Countdown” of Europe and “Jump” by Van Halen, but in general it’s both cool and absurd having it available because all the music of the 80s and early 90s used the sounds of this keyboard.
- Xsynth-dssi is another VST that will mimic a perfect machine for electronic music, just like the old Moog, with hundreds of knobs to try out new sounds, and quite a few ‘ready-made’ sound all really electronic. There is also a perfect imitator of theremin. A Legend.
- Flac is a codec (compression/decompression audio), widely used. Without installing it Rosegarden will also protest at startup.
- Lingot is a tuner for your guitar
- Hydrogen is a drum machine that, in strictly technical terms, kicks ass.
- Hydrogen-drumkits are drumkit for hydrogen to … i’m sure you guess it.
- Jack-rack allows you to make available some audio plugins. Similar to Dssi, but they are available for all applications and not just for Rosegarden
- caps is the king of these plugins (called LADSPA), because it’s the one that simulate in real time any kind of amplifier distortion. There are really good distortions of the tube, and with a little of patience you can get sound from your guitar as if you had a Vox AC-30-style Brit-pop or a Marshall metal.
- LMMS is the Linux equivalent of Windows FruitLoops (but is free and open source).
- fluid-soundfont-gs is a bank of sounds.
- ZynAddSubFX is a synthesizer that, in highly technical language, kicks several asses.
- dssi-vst is a great plugin that allows you to upload several VST Windows
- Rakarrack : See Appendix G
- vocproc is a LV2 plugin, you need it to achieve effects like autotune.
- zynjacku is like Jack Rack but for LV2 plugins. You will find it as “Lv2rack”.
3.2 – Configure wine
We also need to configure wine to use ALSA (sound module for Linux) and Jack (a program whose function we will see later).
Type in terminal:
Go to “Audio” and put the check mark only on “Jack” and “ALSA”. Press “OK “.
3.3 – Launch and configure alsamixer
At this point it is necessary to set up the volume of your sound card. Jack does not use system tools (Pulseaudio, what you normally find in the system preferences), but ALSA, it’s the sound card driver and come first than Pulseaudio.
To adjust the volume of ALSA, open the terminal and type:
If you get errors, it means that your sound card is not fully supported by Linux. You should buy a better-supported and more professional-grade card. If it starts, check whether it’s the sound card you want to use: in some cases, especially if you have a video card with HDMI or an additional professional sound card it’s possible that alsamixer starts with the wrong card. You see it easily because it shows the name.
To exit press ESC.
To know what cards you have, type in a terminal:
If the correct card matches the number one, you’ll have to run Alsamixer like this:
alsamixer -c 1
Obviously the number change depending on the card to be used.
If you want to disable the sound card that always bothers you (like a built-in sound card that you no longer need because you have bought a professional card) you could turn it off directly from the computer’s BIOS, if you can do it. But in some cases, the system sees it anyway. So it’s better to disable it. To do this, type:
and locate the card module to delete. For example
then open the file with “black list” of kernel modelus:
sudo gedit /etc/modprobe.d/blacklist.conf
And in the end add:
# integrated sound card blacklist 'module name'
# integrated sound card blacklist snd_hda_intel
Save and close. When you reboot, you will not see a trace of that sound card.
3.4 – Configure volumes
Once you open alsamixer, you can press the TAB (left of the letter Q on your keyboard) to switch between the “ Playback ” view to the “ Capture “(recording) view and vice versa.
To adjust the volume pass from one to another with the arrow keys (the right and left) while to increase and Decrease them press the buttons up arrow and down arrow
In the Playback view, to mute or to restore a volume, press M
In the Capture view to activate an input in the recording, press the space bar.
Adjusting the volume is essential. Keep Alsamixer open while you are producing audio or working on a project: it is from there that you really decide what goes in and what comes out from the sound card.
4. Install the soundfont
SoundFonts are banks of sounds of instruments. In practice, a full orchestra: MIDI files are the musical score, and the musicians are the soundfont. Obviously, different orchestras each have a different “sound” . I recommend two in particular, for free. Open the terminal and type (one line at a time!)
>wget ftp://ftp.personalcopy.net/pub/Unison.sf2.gz wget ftp://ftp.personalcopy.net/pub/PC51f.sf2.gz gunzip Unison.sf2.gz gunzip PC51f.sf2.gz sudo mv Unison.sf2 /usr/share/sounds/sf2/ sudo mv PC51f.sf2 /usr/share/sounds/sf2/
In addition, you can download from here all you want:
Once unpacked, you just copy them in /usr/share/sounds/sf2 for example opening the file manager of Ubuntu as administrator:
This is the End of Part 1 of this guide on how to produce Music with Linux, stay tuned for the next 3 parts.
Thanks to Hans for the proofreading.
And thanks once again to Stefano Droghetti for this guide.
[amazon_enhanced asin="1886411344" price="All" background_color="332610" link_color="FFFFFF" text_color="D4CE99" /]
[amazon_enhanced asin="1593272707" price="All" background_color="332610" link_color="FFFFFF" text_color="D4CE99" /]
- Linux Terminal: Manage Processes with killall and kill
- Play your Music on Linux with Music Player Daemon
- How to measure memory usage in Linux
Find me on Google+