|
|||||||||||||
|
Linux Audio WorkstationLog of my attempt to put together a Linux Audio WorkstationThe Goal Abandoning Fedora Core 4 How a Linux Audio Workstation should Work Lost in the Distro Wilderness Back to Fedora Core 4 16 May 20 May 21 May 30 May - Success! Comments The Goal[Monday, May 15, 2006] I am attempting to put together a Linux Audio Workstation. For years I was running Windows98, because that's the only OS that my old copy of Cubase supported. But I decided to enter the 21st century. Also, I've seen hints that there are better audio tools available on Linux now than there were just a few years ago. Linux has supported direct-to-disk recording for a while, and JACK is supposed to be a great realtime synthesis architecture. However, my LAW project is not going very well. About 3 weeks ago I carefully saved some precious data, then wiped my machine clean. I tried installing a couple of different Linux distributions, but ultimately settled on Fedora Core 4.Abandoning Fedora Core 4There are a lot of things I liked about FC4. Pretty much all of the distros I tried supported both Gnome and KDE, but I found FC4 had the cleanest install. Also, I was very impressed by yum , which makes it very easy to automatically update software in a reasonably reliable way. However, there were a few problems with FC4 and audio. For one thing, Jack wasn't well supported out-of-the-box. I really wanted to use Rosegarden as my Cubase replacement, but it had a tendency to lock up my system every time I shut it down (!). I couldn't get my MIDI interface to work (serial connection), and I couldn't find any way to debug the problem. Even just playing mp3 files was iffy--the playback would stutter when I refreshed pages in Firefox (!). CPU wasn't anything close to maxed out, but somehow xmms couldn't handle any other process interrupting it, no matter how briefly. To be fair to xmms, this was a symptom of problems with low-level audio code, not xmms itself. After futzing around and attempting to debug for a few weeks, I decided enough was enough. I figured I'd try out some other distros to see if any supported audio any better.How a Linux Audio Workstation should WorkAudio signals are continuous streams coming out of the computer, either audio or midi streams (or in my case, both). You sometimes see people referring to the need for a realtime kernel, so that audio drivers can always pre-empt other processes. The idea is that giving audio processes high priority will help keep outgoing audio streams continuous. That's bogus. Audio hardware handles the streaming for you. If a process on the machine wants to output audio, it sends out chunks of data to the audio hardware via the drivers. So the audio hardware buffers up outgoing data, and streams it continuously. It doesn't matter if processes on the machine get swapped in and out, and only get to talk to the hardware occasionally. When they do talk to the hardware, audio processes hand over enough data that the hardware can keep busy until the process is able to communicate again with more data. Windows98 isn't a realtime operating system, and it did just fine. Winamp never stuttered when I was surfing with Firefox, and Cubase was able to stream audio and midi even when I had other processes going. So a LAW should be able to keep outgoing audio and midi buffered, and applications should be written to keep those buffers full. You should never hear stuttering.Lost in the Distro WildernessI posted for help on a few Linux forums. No one was able to help debug (or even send pointers to help debug) my midi problems, but everyone had distro suggestions. Two Linux distributions in particular were pretty cool. These are projects where audio communities have attempted to put together very targeted releases, aimed at multimedia consumers. One was Dynebolic , which had a great Live CD (that is, you could boot the distribution without having to install it). I have some funky graphics hardware, but Dynebolic did an okay job detecting my gear.Back to Fedora Core 4So I decided to return to FC4. I lost a day or two before I realized that my FC4 installation disk had gotten scratched (!). The first few installs failed (the machine would refuse to boot afterwards), and I mistakenly attributed it to a hard disk problem. One side effect of that is that I installed some other distros I had, including SUSE . I had forgotten that SUSE also had a great setup. Clean install, and I really like their environments for runlevel 3 and 5. Runlevel 5 is just X-Windows (KDE for me), but they had a good layout. Runlevel 3 was wild, they had somehow gotten a graphical feel for the simple console interface.16 MayQuick update: I noticed that with my latest FC4 update, xmms plays much more sensibly. For instance, the stuttering has disappeared.
20 MayI've been able to get most audio applications working with Jack. Again, Jack looks pretty stable and very useful. I was able to get Hydrogen working. Like Jack, I had heard a lot of hype about that, and it was justified. MIDI is still busted. I went out and bought a soundcard with a game port, so I could try that driver instead of the serial port. No love. I have found several other people who have been completely blocked by MIDI support on Linux. My favorite post was this one , which was scary reading because I appear to be having the exact same problems. I'm not going to give up yet, though. I certainly agree with one observation: the Linux MIDI how-to is not terribly helpful for beginners (even beginners with Linux + MIDI experience!). I finally found some helpful debugging tools on the Gentoo Linux site . Basically, you should 1) Use lspci to query PCI devices, and verify your cards are detected properly. 2) Verify your card has been initialized by ALSA. Do this by typing "cat /proc/asound/cards". You should see your cards listed. 3) Get the next level of detail on ALSA configuration. Type "cat /proc/asound/oss/sndstat". You should see a listing of drivers, cards, and audio devices (real and virtual). This was my breakthrough for the day. Midi devices showed up clearly as "NOT ENABLED IN CONFIG." I also don't have any midi devices listed in the devices under /dev. However, it is very difficult to tell if I should have any devices listed there. Some sites claim it is needed, while other sites seem to indicate that's an older midi configuration that isn't needed anymore. I'm not sure. At the moment I've got some questions posted to a forum at LinuxQuestions.org , however it is mostly just me talking to myself.21 MayAnother tip: disable the KDE Sound System! Occasionally it would take control of the soundcard, and that would break any other application that was trying to use it (for instance, XMMS). [ To disable the KDE sound system: go to the Control Center on the start menu, click "Sound & Multimedia", then "Sound System". You'll see a big checkbox to enable/disable the KDE sound system. ] Hopefully, KDE and Gnome are moving to Jack. All applications should share the audio resources.30 May - Success!After a long hiatus (weekends, and some simulations of galaxy formation which I'll post later) I returned to debugging my MIDI setup. I did some more digging, and found two interesting sites. The first was this one (midi-organ-net??) which indicated that I'd have to manually edit my kernel module file (/etc/modprobe.conf) and add a line to enable the game port. In my case, this was the line: "options snd-ymfpci mpu_port=0x330". I correlated that with the documentation for the Yamaha driver at ALSA (go to SoundCards -> select your manufacturer -> find card, click Details link) and found that indeed, I'd have to add a line to enable the game port. So I did, and rebooted. I ran "pmidi -l" and hooray!, my midi port was listed. I tried playing a midi file using "pmidi -pCommentsLoading comments...
Post a commentWARNING: This is a very primitive comment posting. Stick to alphanumerics only! No quotes, brackets, etc. |
||||||||||||
|