View Single Post
Old 01-09-2008, 05:03 PM   #4
w00t
Human being with feelings
 
Join Date: Oct 2007
Posts: 133
Default

section III: lets get going (the HOWTO)

Okay now we have a basic Ubuntu desktop install going. now look in your software menu. under "System" you should see a program called "Synaptic Package Manager" (in Kubuntu its called "Adept") ...this was the package manager I mentioned in section I. this will be your best friend in Linux for a lot of reasons. ...but alas we will not be using it (a lot) in this guide! it can easily be used for this guide, but we will be using another utility called "terminal" (Kubuntu's is called "Konsole") to achieve most of this stuff very easily and quickly. In linux you use the terminal to run commands and whatnot while bypassing typical GUI protocol. it is imperative to a good linux experience to familiarize yourself with the terminal at least a little bit.





(terminal)





....for now lets go into our package manager and under the settings menu look for repositories.... make sure under "ubuntu software" we have the "main" "universe" and "multiverse" repositories checked. you may also want to enable the "multiverse" and "restricted drivers" as well because they may come in handy for codec issues and other things. once this is done close the repositories dialog window and hit the "refresh" button. this will refresh your package manager's index and will prepare us to get all the software we will need to make REAPER work. After this, you can close Synaptic and we will turn to the terminal. (should be under accessories in your program menu)



first lets download/install some stuff we will need. in order to do this, you will need "administrative privileges" aka your "password"; we prefix commands that need this with a "sudo" flag in Ubuntu and most Linux environments.


in the terminal copy and paste this command:


Code:
sudo apt-get install linux-image-rt jackd jack-rack qjackctl wine

what does this do you ask? its basically a package manager shortcut that will download and install the realtime kernel, jack audio and its gui, and the wine we talked about earlier. If you used "Ubuntu Studio" you should already have a "realtime' kernel and perhaps the jack stuff. thats okay, because our command will just tell us if we have the newest versions installed and not do anything in that case.


when this is done, you will need to restart and reboot into the "realtime" kernel. you will want to use this kernel for realtime everytime you wanna make music.


okay now back on the ubuntu desktop running the realtime kernel, lets open up the terminal again.

(and for beginners, if you are not sure if you picked the right kernel use the command "uname-r" in the terminal without quotes. this will print which kernel you are currently using. it should have -rt at the end or else you picked the wrong one and have to reboot)



Okay know we are going to do a little "studio preparation". most of this is shamelessly taken from the ubuntu guide, so please refer to it for issues such as firewire cards, multiple sound card issues, other linux audio applications and a few other specific inquiries. I tried to take only what was relevant to the guide as setting up REAPER on linux. We will be using the terminal for this portion. copy/paste the commands one by one until finished. i will briefly describe what each command is doing. and also, If you chose UbuntuStudio as your ubuntu version, you should not have to do this. this is specifically for the 'normal' ubuntu distros.


1. Making sure ALSA stuff is kosher

Code:
sudo apt-get install alsa-firmware-loaders alsa-tools alsa-tools-gui
This will make sure you have all the alsa stuff...in particualr the alsa-tools gui will proably come in handy for adjusting various properties of your soundcard.



2. Enabling realtime support

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

in order to bypass the technobabble, this basically gives your 'audio' group permissions to access realtime functionality. You may notice that the commands look a little different, thats because of the nature of what they are doing. Linux beginners just need to know to use these commands with caution, and to copy/paste them. DO NOT go around using sudo su everywhere! you will regret it!! now lets keep moving...


3. ALSA sequencer module
Code:
sudo modprobe snd-seq

we are going to need this for alsa midi, the midi protocol currently used with wineasio. typically this is not a module that is loaded on boot up, but the above command loads it when entered. to have it persistently load across boot ups, we have to add it to the etc/modules file. Its actually very easy to do with a simple terminal command:

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

and now we dont have to worry about that anymore!




4. Timer resolution

Code:
sudo sysctl -w dev.rtc.max-user-freq=1024
Code:
sudo su -c 'echo dev.rtc.max-user-freq=1024 >> /etc/sysctl.conf'

this ensures that the kernel has a proper timer resolution for midi. the default is 250 hz and these commands change it to 1024. (the second command gives you this resolution every time you boot)



5. Secondary USB keyboard/soundcard fix

Code:
sudo su -c 'echo options snd-usb-audio index=-2 >> /etc/modprobe.d/alsa-base'
this should help if linux confuses a usb keyboard or secondary audio device as he primary device. this usually happens when you leave the usb device plugged in and on while booting up.



addition (5.5 wineasio/jack simlink)

Im going to add this step in because im not sure if you have to do this still or if wineasio already looks. If it already does it it wont hurt to try this command. What it does is create a symlink between wineasio in jack so so jack is activated everytime wineasio in used:

Code:
sudo ln -s /usr/lib/libjack-0.100.0.so.0 /usr/lib/libjack.so.0

that should take care of that




6. setting up JACK


For setting up JACK, ymmv [Your mileage may vary] with a lot of things, but this guide should get you going. make sure you can launch jack control (the terminal command is "qjackctl" without quotes, or look in your program menu under multimedia for "jack control". hit the setup button and make sure realtime is checked, and softmode is checked. here is a picture of what mine looks like for my audiophile 2496 card.





Also refer to the guide previously mentioned for more info and troubleshooting. BEFORE CONTINUING, make sure from jack control that you can start the server with realtime and have no problems...if it times out shortly after starting, ten you have some troubleshooting to do. I will help here where i can, but again, this will very significantly between hardware. once you can verify that the JACk server can run in realtime with no problems, you can close JACK control and move on in the guide.




Alright! our studio preparation is done. lets move on to the wine stuff now.









In the terminal, type this command:

Code:
winecfg

This is the command we use to setup wine. It should bring up a config dialog for wine.




Now to setup a few things.....under the 'applications' tab, with 'default settings' highlighted, you will see a drop down menu where you can pick the "windows" version. it defaults to windows 2000, but switch this to XP. now go to the 'audio' tab. It will give you some driver options here. what we want to pick is ALSA and only ALSA. make sure NOTHING else is checked, or midi will NOT work.

Do not worry about/mess with DirectSound settings.


Now under the 'graphics' tab, un-check 'allow the window manager to control the windows' ...this will give all wine windows the default windows look, versus using your linux window manager. this gives improved performance. Once you get your feet wet a little bit, you may play around with this to see what works best for you.

Last edited by w00t; 01-11-2008 at 10:52 AM.
w00t is offline   Reply With Quote