At the Sounding Edge: Sounding Better All The Time

In preparation for this month's Linux Audio Developers conference at Karlsruhe, Dave offers a status report on the state of Linux audio.

The second annual conference of Linux audio developers will be held in Karlsruhe from April 28 through May 2. If you're in Germany during that period and happen to be near Karlsruhe, you might want to stop by the very cool Zentrum fur Kunst und Medientechnologie (ZKM) and check out some of the many lectures and presentations about the cutting edge work going on in Linux audio software development.

For those of you who can't make it to the conference, I present a brief State Of The Art message here in this month's installment of my At the Sounding Edge series. There's so much going on in the Linux sound software world that I can't hope to cover everything--not even all of the most important developments--but hopefully I can give interested readers a sense of what's happening and what directions we're taking.

ALSA and JACK

Without a doubt, the two most important development tracks are the ALSA and JACK projects. Both supply the foundation for much of the most interesting application development happening today, and support for ALSA/JACK rapidly is becoming de rigeur in new sound software for Linux. I can't explore the technical depths of these fundamental systems, but I'll briefly describe what they are and why they are so important to the Linux audio development and user communities.

I've covered ALSA in a previous column, so I'm going to be brief about it in this article. ALSA is becoming a more familiar acronym, thanks to its inclusion in the Linux kernel sources. The ALSA sound system effectively replaces the older OSS/Free system, greatly expanding the sound services available to developers and normal users. ALSA provides sound card drivers, a library (libasound) for easy access to audio system functions and a suite of handy utilities. Soundcard support ranges from consumer grade cards to high-end professional digital audio boards. This advanced hardware support is necessary for users wanting to use Linux in more demanding audio production environments. Thanks to the efforts of the ALSA team, we now can claim support for a small but significant number of pro-audio boards. Without that support the Linux kernel sound system would remain bound to consumer-grade audio, which may be effective enough for casual use but certainly is insufficient for deployment in a professional studio.

ALSA's utilities include tools for your soundcard mixer (alsamixer, amixer), MIDI connectivity (aconnect), simple record and play programs (aplay, arecord) and a variety of chipset-specific amenities. Almost all are command-line tools, and although they may seem humble mini-applications, they are quite powerful. I refer the interested reader to the information available from the ALSA Web site; if you already have ALSA installed, you can read the informative manual pages (e.g., man aplay).

The list of the wonders of ALSA goes on, but this is neither the time or place to explore them. Again, I refer the reader to the ALSA Web site for the most up-to-date information regarding ALSA's current capabilities.

JACK is perhaps one of the most amazing pieces of software yet written for the Linux audio system. The brainchild of Paul Davis (author of the Ardour hard-disk recording system), JACK's capabilities include these outstanding features :

  • An easy method of adding audio support to new applications

  • A robust professional-grade audio server designed especially for low-latency systems

  • A transport control mechanism for synchronizing the activity of JACK-aware clients

The first feature is, of course, of special interest to programmers. Writing directly for the ALSA API certainly is possible, but by comparison JACK is a much simpler way to provide audio services to a client application. It is no exaggeration to say that JACK has the potential to revolutionize Linux audio development. The list of applications already supporting it is an impressive testimony to its appeal and possibilities (see the JACK Web site for a list of current JACK-aware software).

JACK is fairly agnostic about the underlying audio system, supporting ALSA, OSS and PortAudio. It also is expanding to become a multi-platform solution, with some deployment already possible under the Mac OS X. Again, JACK relieves the developer of concerns about the lower-level audio system, providing a simple and clean interface to the underlying system without sacrificing the system's capabilities.

Inter-application communication is an important feature of both JACK and ALSA. The ALSA sequencer API provides a way for compliant MIDI applications to share I/O ports, permitting multiple access and destinations. JACK does the same for audio, a rather more spectacular feat of programming: MIDI streams are relatively thin compared to digital audio and somewhat easier to manage and synchronize. Digital audio is another kind of beast entirely, with inherent issues of latency effecting the perfect synchronization of I/O streams. JACK has been designed to address and resolve those issues, making it possible to route and connect audio streams in much the same manner as ALSA's sequencer handles MIDI data.

Another exciting aspect of JACK is its transport control. One of the Holy Grails of audio development on any platform is the smooth control (start/stop/continue) of various applications by using a master controller. JACK can do this now with a number of applications, although not all are completely transport-aware. An application must be written with specific support for the JACK transport API, and only recently has that interface stabilized to the point of wider acceptance and deployment. Many well-known Linux sound and music applications already support the JACK transport controls, and more are on the way.

Before leaving this section, I must note that the OSS/Linux driver package from 4Front Technologies still is alive and in active development. However, my focus here is on free and open-source projects. I will cover OSS/Linux and other commercial Linux audio ventures in a future column.

______________________

Similis sum folio de quo ludunt venti.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: At the Sounding Edge: Sounding Better All The Time

Anonymous's picture

Is there anything available in Linux similar to Replay Radio(www.replay-radio.com)? I record a lot of radio for my two blogs (www.rockandrollreport.com & www.communityradioreport.com) and this is one of the only tools that is preventing me from a full migration to Linux (and yes I am a newbie).
Thanks.

Re: At the Sounding Edge: Sounding Better All The Time

Anonymous's picture

I don't know relplay-radio but I guess it can be something like muSe http://muse.dyne.org/
It is a user friendly tool for network radio streaming.

Re: At the Sounding Edge: Sounding Better All The Time

Anonymous's picture

Have you tried running Replay-Radio in Linux via WINE?

Re: At the Sounding Edge: Sounding Better All The Time

Anonymous's picture

No, I have been a bit afraid to tackle Wine. I was hoping for a more Linux native version. I have seen some but they are for MP3 streams only I sometimes need access to Real and WMA streaming as well.

regarding my comment re: Finale and a Linux equivalent (Author's

Anonymous's picture

I have been gently chided for making the statement "Linux has nothing like Finale" by one of the developers of Rosegarden (www.rosegardenmusic.com). I'm still not sure I'd compare RG with Finale, but there's the URL, check it out and let me know if you think there's an apt comparison. Btw, on its own merits RG is a wonderful app, so whether it compares well or badly with Finale it remains outstanding Linux sound & music software.

Re: At the Sounding Edge: Sounding Better All The Time

Anonymous's picture

> In addition, Linux players and plugins for the Real and Flash
> formats are available from their parent companies.

In gtk2 Mozilla, Flash animation is abnormally slow; there is a workaround for this bug:

http://www.pclinuxonline.com/modules.php?name=News&file=article&sid=8574

And I hope the Helix DNA client (Realplayer goes open source, except the Real codec) will become more mature someday.

http://fedoranews.org/tchung/hxplay-ms2/

MusicKit ?

Anonymous's picture

What I am missing is the musickit.org
Which is a fine framework with Mac OS X capabilities

Author's response

Anonymous's picture

I list MusicKit on the Linux soundapps pages, and every now & then I take a trip over to the site to see how far it's progressed. Alas, it's usability under Linux is still sketchy, and it still involves building a set of GNUstep components not commonly found on mainstream Linux distributions. I would love to see more activity on the Linux port: MIDI is still indicated as unsupported (has that changed recently?) nor is the DSP aspect supported (I confess I'm not sure what that means). A complete package (RPM, DEB, tarball) would also be welcome, even in its current state.

Re: At the Sounding Edge: Sounding Better All The Time

Anonymous's picture

Just a quick note: ardour supports a text-only interface, ardour-ksi as well as a more traditionnal gui, ardour-gtk.

Re: At the Sounding Edge: Sounding Better All The Time

Anonymous's picture

OSS/Commercial still sounds superior than ALSA. ALSA is too complicated for no reason but it's better than the OSS/Free drivers. It's funny that OSS apps work better on ALSA drivers than ALSA apps. Maybe its too soon to write an obit for OSS. I'm very happy with my $20.00 OSS/commercial drivers - plus 4Front gives me better support than ALSA. They answered my questions in 10minutes (amazing!). OSS's new Equalizer and Fidelity Enhance rocks my MP3s so hard. man I'm in music heaven now.

Re: At the Sounding Edge: Sounding Better All The Time

Anonymous's picture

I agree and disagree. I've always had pretty good experiences with 4-Front's support. They were always prompt and courteous about responding to problems. On the other hand, I had several problems and headaches with the 4-Front drivers that I've never experienced with ALSA. In addition, there are often hardware specific features that 4-Front will not devote any time to implementing, istead opting for things like their "Virtual Mixer" software instead of native hardware mixing. While I can see some benefits of their Virtual Mixer, I would prefer that they add hardware mixing to the CS46xx drivers. The ALSA drivers have it. It never stopped 4-Front from "borrowing" SPDIF support after it was merged into the ALSA drivers. Why not hardware mixing?

In addition, their Virtual Mixer is not as perfect as it's made out to be. Often, I've had trouble with it accepting audio from some apps, and the mixer locks up and makes the card unusable. It has no support for mmap, used in many commercial games on Linux, and all of the workarounds are simply methods to bypass the mixer device (which negates the purpose for having it anyway). You cannot play Enemy Territory and listen to MP3s at the same time for this very reason.

Older hardware falls into obscurity with 4-Front. There is active development on the (still good) Aureal cards in the ALSA tree. The features are amazing. On 4-Front's drivers, that is not the case.

The Linux kernel now includes ALSA instead of OSS. The latency is better, JACK is more flexible than Virtual Mixer PRO and its rounting capabilities, the API has more potential, and it's free.

I have nothing against 4-Front and OSS. They served me well for about two years. Eventually, however, I had to look the other direction. My experiences have been much better since I've switched to ALSA. ALSA is the future of Linux audio, and all of the useful (and free) audio production tools are being written for it. If you just need to play movies and MP3s, OSS might be a good choice, and 4-Front's OSS might be a good value. But ALSA promises a lot more for Linux audio, and it's free. For me, it delivers the real-deal right now.

Author's response

Anonymous's picture

"Sounds superior" is of course a subjective assessment, and you did not specify what gear you're using. My SBLive sounds fine under either ALSA or OSS/Linux, the big difference being that ALSA is open-source and costs nothing. I don't believe OSS/Linux is being written off quite yet, and I agree that 4Front provides excellent support and that their product is in fact a fine product. You shouldn't be amazed that you received good support: after all, you paid for the drivers, and you should expect support as an aspect of your payment.

I am not particularly attracted to the ALSA vs. OSS arguments. The plain fact is that OSS/Free was an aged and unprogressing API that needed to go. OSS/Linux is most definitely *not* open-source free software, and cannot be considered an appropriate component if free & open-source mean much to the end-user.

I'm glad your Linux music experience is sounding good, but so is mine and I'm using ALSA.

Nothing wrong with having choices...

Linux Audio Conference URL (author's note)

Anonymous's picture

I should have added this URL to the text:

http://www.zkm.de/lad

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix