个人工具

“UbuntuHelp:UbuntuStudioPreparation”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/UbuntuStudioPreparation}}
 
{{From|https://help.ubuntu.com/community/UbuntuStudioPreparation}}
 
{{Languages|UbuntuHelp:UbuntuStudioPreparation}}
 
{{Languages|UbuntuHelp:UbuntuStudioPreparation}}
You will find on this page what has to be done if you want to setup a multimedia production workstation with a standard Ubuntu installation (means without installing Ubuntu Studio).
+
----
However, user with Firewire hardware, pci professional sound card, even on Ubuntu Studio, or simply having questions, may find tips on this page. First of all, be sure to have multiverse, universe, main and restricted repository activated in Synaptic.
+
'''''You will find on this page what to do if you want to setup a multimedia production workstation with a standard Ubuntu installation (means without installing Ubuntu Studio).'''''
All on this page as been tested and work successfully with Ubuntu Hardy LTS, Intrepid (be careful, issues with rt kernel and some restricted drivers), and Jaunty beta (as it is named, it is a beta, but it works...).
+
----
Currently, the Ubuntu preferred version for production would be Ubuntu Hardy LTS. It is indicated where to find backports for important application like Ardour in this page.
+
However, users with Firewire hardware, pci professional sound card, even on Ubuntu Studio, or simply having questions, may find tips on this page. First of all, be sure to have the multiverse, universe, main and restricted repositories activated in Synaptic.
 +
Everything on this page has been tested and works successfully with Ubuntu Hardy LTS and Karmic Beta.
 +
Currently, the Ubuntu preferred version for production is Ubuntu Hardy LTS. It is indicated on this page where to find backports for important applications like Ardour.
 +
Only LTS and current version will be documented on this tutorial.
 
=== Install the "must have" packages ===
 
=== Install the "must have" packages ===
 
If you prefer to install the packages with Synaptic, you can.
 
If you prefer to install the packages with Synaptic, you can.
第12行: 第15行:
 
  sudo apt-get install ardour hydrogen jackd jack-rack qjackctl seq24 vkeybd zynaddsubfx patchage vlc kino pitivi acidrip ubuntu-restricted-extras ubuntustudio-menu gcdmaster
 
  sudo apt-get install ardour hydrogen jackd jack-rack qjackctl seq24 vkeybd zynaddsubfx patchage vlc kino pitivi acidrip ubuntu-restricted-extras ubuntustudio-menu gcdmaster
 
</nowiki></pre>
 
</nowiki></pre>
ardour is a very good audio recorder and sequencer, seq24 is a midi sequencer, vkeybd is a virtual midi keyboard, zynaddsubfx a very good modular synth, hydrogen is a drum kit and sequencing application, jackd is the sound daemon and qjackctl is to setup it well with a GUI, patchage is a very usefull application to patch audio/midi applications and the I/O, gcdmaster allows to create master audio cd.
+
Ardour is a very good audio recorder and sequencer, seq24 is a midi sequencer, vkeybd is a virtual midi keyboard, zynaddsubfx a very good modular synth, hydrogen is a drum kit and sequencing application, jackd is the sound daemon and qjackctl is to setup it well with a GUI, patchage is a very useful application to patch audio/midi applications and the I/O, gcdmaster allows creation of a master audio cd.
==== Specific pci and usb hardware ====
+
==== Specific Pci and USB hardware ====
 
First of all, check on this page if your card is supported : http://alsa-project.org/main/index.php/Matrix:Main
 
First of all, check on this page if your card is supported : http://alsa-project.org/main/index.php/Matrix:Main
 
If your card is said to be supported, but you know is it a low latency sound card, do:
 
If your card is said to be supported, but you know is it a low latency sound card, do:
第19行: 第22行:
 
  sudo apt-get install alsa-firmware-loaders alsa-tools alsa-tools-gui
 
  sudo apt-get install alsa-firmware-loaders alsa-tools alsa-tools-gui
 
</nowiki></pre>
 
</nowiki></pre>
If your card is still not supported, you may find the alsa-firmware in the Medibuntu repository. In order to add it to Synaptic, please go at http://medibuntu.org. Then, do:
+
If your card is still not supported, download this package at this place, whatever version of Ubuntu and Alsa you are using:
 +
http://apt.64studio.com/backports/pool/main/a/alsa-firmware/alsa-firmware_1.0.15-2.64studio1~jaunty1_i386.deb
 +
You may find alsa-firmware in the Medibuntu repository, if you are using it. it is not working good at least for RME sound cards, so don't forget do force version of the alsa-firmware; you can do that in Synaptic: "Package/Force Version" and selection the downloaded one.
 +
Your card will work at reboot. For card like RME hdsp, you may want to run manually the command line "hdsploader". Feel free of course to create a shortcut in your menu or Gnome panel.
 +
==== Firewire (ieee1394 / raw1394) sound cards and cameras ====
 +
If you can't get your Firewire sound card working with Freebob/FFADO and Jack, please first of all have a look at http://ffado.org/?q=devicesupport/list and check if your sound card is supported.
 +
In Hardy LTS and Karmic you can do it in terminal this way:
 
<pre><nowiki>
 
<pre><nowiki>
  sudo apt-get install alsa-firmware
+
  sudo adduser <username> video
 +
sudo adduser <username> audio
 
</nowiki></pre>
 
</nowiki></pre>
And your card will work. For card like RME hdsp, you may need to run manually the command line "hdsploader" in a terminal if the system don't launch it by himself. Feel free of course to create a shortcut in your menu or Gnome panel.
+
Think to change <username> below with the concerned user name.
==== Firewire (ieee1393 / raw1394) sound cards and cameras ====
+
Then, you have to give the access right to "/dev/raw1394" to the "video" group:
If you can't get your Firewire sound card working with Freebob and Jack, please first of all have a look at http://freebob.sourceforge.net/index.php/List_of_Supported_Devices and check if your sound card is supported.
+
If you can't access to your camera through firewire (ieee1394), you have the same problem.
+
Simply do that:
+
 
<pre><nowiki>
 
<pre><nowiki>
  sudo adduser <username> disk
+
  sudo gedit /etc/udev/rules.d/65-permission-raw.rules
 
</nowiki></pre>
 
</nowiki></pre>
Think to change <username> below with the concerned user name. So you will have the access to raw1394 without being root.
+
And make a copy/paste of this into the file:
NB: it may cause a security problem if you are using ieee1394 for other than hard disk, camera or sound card connection, for exemple with network
+
<pre><nowiki>
 +
KERNEL=="raw1394", OWNER="root", GROUP="video", MODE="660"
 +
</nowiki></pre>
 +
Restart the workstation is necessary to get the acces right.
 +
In Karmic, install then the ffado utils:
 +
<pre><nowiki>
 +
  sudo apt-get install ffado-dbus-server ffado-mixer-qt4 ffado-tools libffado1
 +
</nowiki></pre>
 +
So you will have the access to raw1394 without being root. NB: it may cause a security problem if you are using ieee1394 for other than hard disk, camera or sound card connection, but for exemple with ieee1394 networking. You will have to run one time with the sound card "on" before starting the workstation, in order to confirm right access. Then it is not necessary anymore.
 +
In Qjackctl setup, choose in the "Driver" list "freebob" if you are in Hardy, and "firewire" if you are using Karmic. In the "Interface" list, choose "hw:0".
 +
In Karmic, you may need to install "a2jmidid" package. This application allows you to make connections between alsa-midi and jack-midi peripherals, sound cards in/out and audio applications. The new FFADO driver create now only jack-midi instance for the physical input and output of your firewire sound card. So if you are using them, you will need to launch "a2jmidid" in a terminal, or to add this command line to the Qjackctl start option to be launched automatically.
 +
You can find some GUI tools and howto on the Ubuntu Studio [[UbuntuHelp:FireWire|FireWire Audio]] documentation. However, take care using the Ubuntu Studio Control Gui, it is very buggy.
 
==== Effect Plugins, Instruments and Codecs ====
 
==== Effect Plugins, Instruments and Codecs ====
Install the LADSPA plugins so you get some effect plugins for your audio applications to use:
+
Install the LADSPA plugins so you get some effect plugins for your audio applications to use.
 +
For audio processing:
 +
<pre><nowiki>
 +
  sudo apt-get install blop caps cmt fil-plugins rev-plugins swh-plugins tap-plugins
 +
</nowiki></pre>
 +
For synthetisers:
 
<pre><nowiki>
 
<pre><nowiki>
   sudo apt-get install blop caps cmt fil-plugins ladspa-sdk mcp-plugins omins swh-plugins tap-plugins vcf-plugins
+
   sudo apt-get install blepvco mcp-plugins omins  
 
</nowiki></pre>
 
</nowiki></pre>
 
Install the DSSI host and plugins:
 
Install the DSSI host and plugins:
 
<pre><nowiki>
 
<pre><nowiki>
  sudo apt-get install dssi-host-jack dssi-example-plugins dssi-plugin-fluidsynth dssi-plugin-hexter dssi-plugin-xsynth
+
  sudo apt-get install dssi-host-jack dssi-example-plugins fluidsynth-dssi hexter xsynth-dssi
 
</nowiki></pre>
 
</nowiki></pre>
 
More infos are provided below, see the "VST Instruments" section.
 
More infos are provided below, see the "VST Instruments" section.
 
Install the video codecs:
 
Install the video codecs:
 
<pre><nowiki>
 
<pre><nowiki>
  sudo apt-get install gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-tools ffmpeg ffmpeg2theora
+
  sudo apt-get install gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse ffmpeg
 
</nowiki></pre>
 
</nowiki></pre>
 
If you use the Medibuntu repository, you can add other codecs, and encrypted DVD support to Ubuntu:
 
If you use the Medibuntu repository, you can add other codecs, and encrypted DVD support to Ubuntu:
第51行: 第74行:
 
  sudo apt-get install non-free-codecs libdvdcss2
 
  sudo apt-get install non-free-codecs libdvdcss2
 
</nowiki></pre>
 
</nowiki></pre>
Please see http://medibuntu.org for more information.
+
Please see http://medibuntu.org for more information. Think to update, because Medibuntu may provide more complete version of VLC, Mplayer, Mencoder, etc...
 +
=== VST Instruments ===
 +
You can use [http://en.wikipedia.org/wiki/Virtual_Studio_Technology Windows VST plug-ins] (with certain limitations) via [http://www.breakfastquay.com/dssi-vst/ dssi-vst], which will make them available as if they were native Linux (DSSI) plug-ins.  Unfortunately, this adaptor is not readily available as a .deb package due to licensing restrictions, so you may need to build it yourself from [http://www.breakfastquay.com/dssi-vst/ source].  If you attempt this, make sure you have the ALSA and Wine sources installed first, as these are pre-requisites. You'll also need the DSSI and liblo headers.
 +
<pre><nowiki>
 +
~/dssi-vst-0.8$ sudo apt-get install libasound2-dev wine-dev liblo-dev dssi-dev
 +
~/dssi-vst-0.8$ make && sudo make install
 +
</nowiki></pre>
 +
Once you have dssi-vst installed, copy the .DLLs for your VST plug-ins into the directory /usr/local/lib/vst, restart JACK, and they should automatically appear in any applications which make use of DSSI plug-ins (such as Rosegarden).
 
=== Real Time Kernel & Xruns ===
 
=== Real Time Kernel & Xruns ===
 
Xruns. What are they? Well, simply put, either they are buffer underruns or buffer overruns.
 
Xruns. What are they? Well, simply put, either they are buffer underruns or buffer overruns.
 
* A buffer underrun happens during playback, when your sound card tries to read data from the buffer, but your software has not yet filled it.
 
* A buffer underrun happens during playback, when your sound card tries to read data from the buffer, but your software has not yet filled it.
 
* A buffer overruns happens during recording, when your sound card tries to write data to buffer, but your software has not yet emptied it.
 
* A buffer overruns happens during recording, when your sound card tries to write data to buffer, but your software has not yet emptied it.
The only acceptable time to receive Xruns is during application startup. Currently, for whatever reason, JACK applications usually cause a few Xruns as it connects to the JACK server, but these will not hurt you in any way. The most critical time to not receive an Xrun is during recording, because it causes a permanent glitch in your audio, which may or may not be easily heard.
+
The only acceptable time to receive Xruns is during application startup. Currently, for whatever reason, JACK applications usually cause a few Xruns as they connect to the JACK server, but these will not hurt you in any way. The most damaging time to receive an Xrun is during recording, because it causes a permanent glitch in your audio, which may or may not be easily heard.
So now you should understand basically why you want to avoid Xruns. They will cause issues with your recordings, or cause annoyance during playback. Thankfully, you can get these down to a minimum, if not eliminate them altogether.
+
So, now you should understand basically why you want to avoid Xruns. They will cause issues with your recordings, or cause annoyance during playback. Thankfully, you can get these down to a minimum, if not eliminate them altogether.
The better way to avoid X-Runs is to install a real time kernel, optimized for audio production with low latency. You can simply do:
+
The best way to avoid XRuns is to install a real time kernel, optimized for audio production with low latency. You can simply do:
 
<pre><nowiki>
 
<pre><nowiki>
  sudo apt-get install linux-rt
+
  sudo apt-get install linux-rt linux-headers-rt
 
</nowiki></pre>
 
</nowiki></pre>
 
Then follow the advice below under 'Real-Time Support' and you should be set up to run jackd and other applications in real time low latency mode. You need to reboot after you've installed the low-latency package and made the changes below. Make sure you reboot into the right kernel - it will come up in the list on the boot screen, but may not be set as the default option.
 
Then follow the advice below under 'Real-Time Support' and you should be set up to run jackd and other applications in real time low latency mode. You need to reboot after you've installed the low-latency package and made the changes below. Make sure you reboot into the right kernel - it will come up in the list on the boot screen, but may not be set as the default option.
Some packages which require compilation of modules (such as nvidia drivers or Virtualbox) may not work until you install realtime linux headers. To install them:
+
Take care, with some nVidia or AMD/ATI graphic card, the linux-rt kernel will not work with restricted driver. It always better to avoid use of restricted drivers if you don't need them. If your aim is audio production (recording, live performance) at low latency, my advice is to stay at the moment on Ubuntu Hardy LTS. Karmic is under testing.
<pre><nowiki>
+
sudo apt-get install linux-headers-rt
+
</nowiki></pre>
+
Take care, with some nVidia graphic card, the linux-rt kernell will not work with nvidia-glx-new driver. In Intrepid, if there is a mistake, instead of GDM Login Screen, you will be prompted to setup a new default configuration, and then have to restart. Great new feature. If your aim is audio production at low latency, my advice is to stay at the moment on Ubuntu Hardy LTS.
+
 
=== Real-Time Support ===
 
=== Real-Time Support ===
 
After you've got the kernel you still need to set up real-time access for your applications.
 
After you've got the kernel you still need to set up real-time access for your applications.
第73行: 第99行:
 
<pre><nowiki>
 
<pre><nowiki>
 
  sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
 
  sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
  sudo su -c 'echo @audio - nice -19 >> /etc/security/limits.conf'
+
  sudo su -c 'echo @audio - nice -10 >> /etc/security/limits.conf'
 
  sudo su -c 'echo @audio - memlock unlimited >> /etc/security/limits.conf'
 
  sudo su -c 'echo @audio - memlock unlimited >> /etc/security/limits.conf'
 
</nowiki></pre>
 
</nowiki></pre>
 
These value are suggested by [http://jackaudio.org/faq http://jackaudio.org/faq]. The memlock line determines how much of your memory can be locked by audio processes.  Some recommend setting this as half of your total memory (RAM, in KB).  See [http://tapas.affenbande.org/wordpress/?page_id=73 Florian Paul Schmidt's page].
 
These value are suggested by [http://jackaudio.org/faq http://jackaudio.org/faq]. The memlock line determines how much of your memory can be locked by audio processes.  Some recommend setting this as half of your total memory (RAM, in KB).  See [http://tapas.affenbande.org/wordpress/?page_id=73 Florian Paul Schmidt's page].
In Intrepid and Januty Beta, you have to create a user group named "audio" and add your user name (and other users of the workstation if needed) to this group. You can do that very simply in "System / Administration / User Group".
+
If you use a Firewire sound card, you already done the step described here: in Hardy and Karmic beta, this group is already created at installation. You just have to do:
Restart the workstation and it is ok.
+
<pre><nowiki>
 +
sudo adduser <username> audio
 +
</nowiki></pre>
 +
Restart Ubuntu and it is ok.
 +
If you experience freezes after rebooting Jaunty Jackalope, try removing the "memlock unlimited" line or changing it to a different value. Always keep a -generic kernel on your Grub list. If for some reason you can't boot with the -rt kernel, it will be very usefull.
 
=== ALSA Sequencer ===
 
=== ALSA Sequencer ===
 
If you can not have midi sequencing enabled, or if you have midi error message, the Alsa midi sequencer module of the kernel may not be loaded. Try that:
 
If you can not have midi sequencing enabled, or if you have midi error message, the Alsa midi sequencer module of the kernel may not be loaded. Try that:
第94行: 第124行:
 
So, to make a long story short, you can ensure that one of your sound-devices is always "0" with this small modification:
 
So, to make a long story short, you can ensure that one of your sound-devices is always "0" with this small modification:
 
Edit the following file with your favorite editor, e.g,
 
Edit the following file with your favorite editor, e.g,
For Hardy LTS and Intrepid:
+
For Hardy LTS:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo gedit /etc/modprobe.d/alsa-base
 
sudo gedit /etc/modprobe.d/alsa-base
 
</nowiki></pre>
 
</nowiki></pre>
For Jaunty Beta:
+
For Karmic:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo gedit /etc/modprobe.d/alsa-base.conf
 
sudo gedit /etc/modprobe.d/alsa-base.conf
第104行: 第134行:
 
and append this to the bottom of the file, making adjustments as required for your setup, see example below:
 
and append this to the bottom of the file, making adjustments as required for your setup, see example below:
 
<pre><nowiki>
 
<pre><nowiki>
options snd-usb-audio index=-2
 
 
options snd_hda-intel index=0
 
options snd_hda-intel index=0
 
options snd_indigoio index=1
 
options snd_indigoio index=1
第114行: 第143行:
 
To find the name of your sound card driver, go there :
 
To find the name of your sound card driver, go there :
 
http://alsa-project.org/main/index.php/Matrix:Main
 
http://alsa-project.org/main/index.php/Matrix:Main
=== VST Instruments ===
 
You can use [http://en.wikipedia.org/wiki/Virtual_Studio_Technology Windows VST plug-ins] (with certain limitations) via [http://www.breakfastquay.com/dssi-vst/ dssi-vst], which will make them available as if they were native Linux (DSSI) plug-ins.  Unfortunately, this adaptor is not readily available as a .deb package due to licensing restrictions, so you may need to build it yourself from [http://www.breakfastquay.com/dssi-vst/ source].  If you attempt this, make sure you have the ALSA and Wine sources installed first, as these are pre-requisites.
 
<pre><nowiki>
 
~/dssi-vst-0.8$ sudo apt-get install libasound2-dev wine-dev
 
~/dssi-vst-0.8$ make && sudo make install
 
</nowiki></pre>
 
Once you have dssi-vst installed, copy the .DLLs for your VST plug-ins into the directory /usr/local/lib/vst, restart JACK, and they should automatically appear in any applications which make use of DSSI plug-ins (such as Rosegarden).
 
 
=== Unofficial Backports ===
 
=== Unofficial Backports ===
Khashayar Naderehvandi is one of the packager and backporter of the Ubuntu Studio team. In his PPA, you will find backported version of major packages for multimedia production, such as Ardour, Alsa drivers, Blender, Jackd with integrated FFADO support, Pulse Audio, etc, and the usefull "qgtkstyle" package allowing QT application to be well integrated in Gnome.
+
In Karmic, all seems to be up to date at the beta time. For Hardy LTS, I suggest you to go to Launchpad PPA search page, and look if you can find what you are looking for (you may find VLC with jack support, LMMS, etc... in their current stable/dev version). Go there:
Packages are available for Hardy LTS, Intrepid and Jaunty beta.
+
https://launchpad.net/ubuntu/+ppas
In order to add the repository to apt and Synaptic, see detailed package list and install them, go to this Launchpad page:
+
https://launchpad.net/~khashayar/+archive/ppa
+
Then, update and install the other packages you need.
+
Be careful, take the time to read the instructions and disclaimer: it is backport, and if it is aimed to be stable, some packages may not be. Please, report to Khashayar if the packages work too, not only if they don't.
+
 
=== Getting it All Going ===
 
=== Getting it All Going ===
 
First, you will want to launch QjackCtl by itself, and configure it for your soundcard. Follow the [[UbuntuHelp:HowToJACKConfiguration|HowToJACKConfiguration]] page if you need help.
 
First, you will want to launch QjackCtl by itself, and configure it for your soundcard. Follow the [[UbuntuHelp:HowToJACKConfiguration|HowToJACKConfiguration]] page if you need help.
 
Next, we recommend you to use Patchage to connect applications within them and with hardware I/O (audio and midi), as you want.
 
Next, we recommend you to use Patchage to connect applications within them and with hardware I/O (audio and midi), as you want.
 
=== Comments ===
 
=== Comments ===
* It is just an update of the original Gutsy page for Hardy LTS, Intrepid and Jaunty.
+
* It is just an update of the original Gutsy page for Hardy LTS, Intrepid, Jaunty and Karmic Beta.
 
* This page is aimed to be a reference of tweaks and steps for setting up a multimedia workstation from a standard Ubuntu installation. I and others are doing their best, testing with our available hardware, to provide the best information available as possible. In order to be the more and more complete and stable, if you find something wrong, feel free to correct it. In the same way, you can add good infos once you are sure it works well. Please, think to respect the layout. ttoine
 
* This page is aimed to be a reference of tweaks and steps for setting up a multimedia workstation from a standard Ubuntu installation. I and others are doing their best, testing with our available hardware, to provide the best information available as possible. In order to be the more and more complete and stable, if you find something wrong, feel free to correct it. In the same way, you can add good infos once you are sure it works well. Please, think to respect the layout. ttoine
 
* Don't hesitate to come on #ubuntustudio on freenode's irc if you have any question, or you want to help. You can write to the Ubuntu Studio devel mailing list too.
 
* Don't hesitate to come on #ubuntustudio on freenode's irc if you have any question, or you want to help. You can write to the Ubuntu Studio devel mailing list too.
 +
* If you want to add tips for an application, this is not the right place. Please create a new page or fill the page dedicated to this software in the [[UbuntuHelp:UbuntuStudio|UbuntuStudio]] pages of the wiki
 
----
 
----
 
[[category:CategoryAudio]]
 
[[category:CategoryAudio]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年11月17日 (二) 20:58的版本


You will find on this page what to do if you want to setup a multimedia production workstation with a standard Ubuntu installation (means without installing Ubuntu Studio).


However, users with Firewire hardware, pci professional sound card, even on Ubuntu Studio, or simply having questions, may find tips on this page. First of all, be sure to have the multiverse, universe, main and restricted repositories activated in Synaptic. Everything on this page has been tested and works successfully with Ubuntu Hardy LTS and Karmic Beta. Currently, the Ubuntu preferred version for production is Ubuntu Hardy LTS. It is indicated on this page where to find backports for important applications like Ardour. Only LTS and current version will be documented on this tutorial.

Install the "must have" packages

If you prefer to install the packages with Synaptic, you can.

The basics

If you are still unsure of which you would like to use, or where to start, a sane set of defaults can be installed by doing this:

 sudo apt-get install ardour hydrogen jackd jack-rack qjackctl seq24 vkeybd zynaddsubfx patchage vlc kino pitivi acidrip ubuntu-restricted-extras ubuntustudio-menu gcdmaster

Ardour is a very good audio recorder and sequencer, seq24 is a midi sequencer, vkeybd is a virtual midi keyboard, zynaddsubfx a very good modular synth, hydrogen is a drum kit and sequencing application, jackd is the sound daemon and qjackctl is to setup it well with a GUI, patchage is a very useful application to patch audio/midi applications and the I/O, gcdmaster allows creation of a master audio cd.

Specific Pci and USB hardware

First of all, check on this page if your card is supported : http://alsa-project.org/main/index.php/Matrix:Main If your card is said to be supported, but you know is it a low latency sound card, do:

 sudo apt-get install alsa-firmware-loaders alsa-tools alsa-tools-gui

If your card is still not supported, download this package at this place, whatever version of Ubuntu and Alsa you are using: http://apt.64studio.com/backports/pool/main/a/alsa-firmware/alsa-firmware_1.0.15-2.64studio1~jaunty1_i386.deb You may find alsa-firmware in the Medibuntu repository, if you are using it. it is not working good at least for RME sound cards, so don't forget do force version of the alsa-firmware; you can do that in Synaptic: "Package/Force Version" and selection the downloaded one. Your card will work at reboot. For card like RME hdsp, you may want to run manually the command line "hdsploader". Feel free of course to create a shortcut in your menu or Gnome panel.

Firewire (ieee1394 / raw1394) sound cards and cameras

If you can't get your Firewire sound card working with Freebob/FFADO and Jack, please first of all have a look at http://ffado.org/?q=devicesupport/list and check if your sound card is supported. In Hardy LTS and Karmic you can do it in terminal this way:

 sudo adduser <username> video
 sudo adduser <username> audio

Think to change <username> below with the concerned user name. Then, you have to give the access right to "/dev/raw1394" to the "video" group:

 sudo gedit /etc/udev/rules.d/65-permission-raw.rules

And make a copy/paste of this into the file:

 KERNEL=="raw1394", OWNER="root", GROUP="video", MODE="660"

Restart the workstation is necessary to get the acces right. In Karmic, install then the ffado utils:

  sudo apt-get install ffado-dbus-server ffado-mixer-qt4 ffado-tools libffado1

So you will have the access to raw1394 without being root. NB: it may cause a security problem if you are using ieee1394 for other than hard disk, camera or sound card connection, but for exemple with ieee1394 networking. You will have to run one time with the sound card "on" before starting the workstation, in order to confirm right access. Then it is not necessary anymore. In Qjackctl setup, choose in the "Driver" list "freebob" if you are in Hardy, and "firewire" if you are using Karmic. In the "Interface" list, choose "hw:0". In Karmic, you may need to install "a2jmidid" package. This application allows you to make connections between alsa-midi and jack-midi peripherals, sound cards in/out and audio applications. The new FFADO driver create now only jack-midi instance for the physical input and output of your firewire sound card. So if you are using them, you will need to launch "a2jmidid" in a terminal, or to add this command line to the Qjackctl start option to be launched automatically. You can find some GUI tools and howto on the Ubuntu Studio FireWire Audio documentation. However, take care using the Ubuntu Studio Control Gui, it is very buggy.

Effect Plugins, Instruments and Codecs

Install the LADSPA plugins so you get some effect plugins for your audio applications to use. For audio processing:

  sudo apt-get install blop caps cmt fil-plugins rev-plugins swh-plugins tap-plugins

For synthetisers:

  sudo apt-get install blepvco mcp-plugins omins 

Install the DSSI host and plugins:

 sudo apt-get install dssi-host-jack dssi-example-plugins fluidsynth-dssi hexter xsynth-dssi

More infos are provided below, see the "VST Instruments" section. Install the video codecs:

 sudo apt-get install gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse ffmpeg

If you use the Medibuntu repository, you can add other codecs, and encrypted DVD support to Ubuntu:

 sudo apt-get install non-free-codecs libdvdcss2

Please see http://medibuntu.org for more information. Think to update, because Medibuntu may provide more complete version of VLC, Mplayer, Mencoder, etc...

VST Instruments

You can use Windows VST plug-ins (with certain limitations) via dssi-vst, which will make them available as if they were native Linux (DSSI) plug-ins. Unfortunately, this adaptor is not readily available as a .deb package due to licensing restrictions, so you may need to build it yourself from source. If you attempt this, make sure you have the ALSA and Wine sources installed first, as these are pre-requisites. You'll also need the DSSI and liblo headers.

~/dssi-vst-0.8$ sudo apt-get install libasound2-dev wine-dev liblo-dev dssi-dev
~/dssi-vst-0.8$ make && sudo make install

Once you have dssi-vst installed, copy the .DLLs for your VST plug-ins into the directory /usr/local/lib/vst, restart JACK, and they should automatically appear in any applications which make use of DSSI plug-ins (such as Rosegarden).

Real Time Kernel & Xruns

Xruns. What are they? Well, simply put, either they are buffer underruns or buffer overruns.

  • A buffer underrun happens during playback, when your sound card tries to read data from the buffer, but your software has not yet filled it.
  • A buffer overruns happens during recording, when your sound card tries to write data to buffer, but your software has not yet emptied it.

The only acceptable time to receive Xruns is during application startup. Currently, for whatever reason, JACK applications usually cause a few Xruns as they connect to the JACK server, but these will not hurt you in any way. The most damaging time to receive an Xrun is during recording, because it causes a permanent glitch in your audio, which may or may not be easily heard. So, now you should understand basically why you want to avoid Xruns. They will cause issues with your recordings, or cause annoyance during playback. Thankfully, you can get these down to a minimum, if not eliminate them altogether. The best way to avoid XRuns is to install a real time kernel, optimized for audio production with low latency. You can simply do:

 sudo apt-get install linux-rt linux-headers-rt

Then follow the advice below under 'Real-Time Support' and you should be set up to run jackd and other applications in real time low latency mode. You need to reboot after you've installed the low-latency package and made the changes below. Make sure you reboot into the right kernel - it will come up in the list on the boot screen, but may not be set as the default option. Take care, with some nVidia or AMD/ATI graphic card, the linux-rt kernel will not work with restricted driver. It always better to avoid use of restricted drivers if you don't need them. If your aim is audio production (recording, live performance) at low latency, my advice is to stay at the moment on Ubuntu Hardy LTS. Karmic is under testing.

Real-Time Support

After you've got the kernel you still need to set up real-time access for your applications. All you have to do for this is give your audio group permissions to access the rtprio, nice, and memlock limits. To do this, you just need to run these commands, which will add some lines to the file /etc/security/limits.conf:

 sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
 sudo su -c 'echo @audio - nice -10 >> /etc/security/limits.conf'
 sudo su -c 'echo @audio - memlock unlimited >> /etc/security/limits.conf'

These value are suggested by http://jackaudio.org/faq. The memlock line determines how much of your memory can be locked by audio processes. Some recommend setting this as half of your total memory (RAM, in KB). See Florian Paul Schmidt's page. If you use a Firewire sound card, you already done the step described here: in Hardy and Karmic beta, this group is already created at installation. You just have to do:

 sudo adduser <username> audio

Restart Ubuntu and it is ok. If you experience freezes after rebooting Jaunty Jackalope, try removing the "memlock unlimited" line or changing it to a different value. Always keep a -generic kernel on your Grub list. If for some reason you can't boot with the -rt kernel, it will be very usefull.

ALSA Sequencer

If you can not have midi sequencing enabled, or if you have midi error message, the Alsa midi sequencer module of the kernel may not be loaded. Try that:

 sudo modprobe snd-seq

If it works, to have your system load it at bootup, you have to add it to the /etc/modules file, do:

 sudo su -c 'echo snd-seq >> /etc/modules'

USB MIDI Keyboard/USB Secondary Sound Card Fix

Since Hardy LTS, this should be already done. You can see below how to tweak if necessary.

Configuration of more than one pci/usb sound/midi card

When having more than one soundcard, it often appears that one card is one time the default device, other times it's an other one. This has led to a lack of output because the "System/Preferences/Sound" control panel seems to only consider card "0" to be the default, even if you change it. So, to make a long story short, you can ensure that one of your sound-devices is always "0" with this small modification: Edit the following file with your favorite editor, e.g, For Hardy LTS:

sudo gedit /etc/modprobe.d/alsa-base

For Karmic:

sudo gedit /etc/modprobe.d/alsa-base.conf

and append this to the bottom of the file, making adjustments as required for your setup, see example below:

options snd_hda-intel index=0
options snd_indigoio index=1
options snd_hdsp index=2
options snd_foo index=3
#etc...

Where "foo" is the name of the alsa driver for the soundcard (pci or usb, audio or midi). Not Firewire! To find the name of your sound card driver, go there : http://alsa-project.org/main/index.php/Matrix:Main

Unofficial Backports

In Karmic, all seems to be up to date at the beta time. For Hardy LTS, I suggest you to go to Launchpad PPA search page, and look if you can find what you are looking for (you may find VLC with jack support, LMMS, etc... in their current stable/dev version). Go there: https://launchpad.net/ubuntu/+ppas

Getting it All Going

First, you will want to launch QjackCtl by itself, and configure it for your soundcard. Follow the HowToJACKConfiguration page if you need help. Next, we recommend you to use Patchage to connect applications within them and with hardware I/O (audio and midi), as you want.

Comments

  • It is just an update of the original Gutsy page for Hardy LTS, Intrepid, Jaunty and Karmic Beta.
  • This page is aimed to be a reference of tweaks and steps for setting up a multimedia workstation from a standard Ubuntu installation. I and others are doing their best, testing with our available hardware, to provide the best information available as possible. In order to be the more and more complete and stable, if you find something wrong, feel free to correct it. In the same way, you can add good infos once you are sure it works well. Please, think to respect the layout. ttoine
  • Don't hesitate to come on #ubuntustudio on freenode's irc if you have any question, or you want to help. You can write to the Ubuntu Studio devel mailing list too.
  • If you want to add tips for an application, this is not the right place. Please create a new page or fill the page dedicated to this software in the UbuntuStudio pages of the wiki