Under The Microscope

Archive for March, 2012

A New Version of Airfoil Speakers for Linux

For several years now, we’ve provided an unsupported version of Airfoil Speakers for Linux users. Using Airfoil Speakers for Linux, you can send audio from Airfoil on your Mac or Windows machine to your Linux box. Unfortunately, the Linux app depended on multiple 3rd-party libraries, particularly for the GUI portions of the code. As such, it was quite difficult to keep it properly functioning with the many different flavors of Linux. While discussing how we could provide maximum compatibility, we realized that the most important feature of Airfoil Speakers was, of course, its ability to receive and play audio.

Focusing on that core function, we developed a simple, command line version of Airfoil Speakers, seen below. This new version runs on every Linux distro we’ve tested with so far1. Further, we’ve spent a fair amount of time stream-lining the Linux build system to allow us to quickly build and deploy updated packages in variety of formats2.

Airfoil Speakers for Linux in Action
Airfoil Speakers for Linux in Action

The first thing you’ll notice about the new Airfoil Speakers for Linux is that it runs right in the Terminal. Of course, this means that any customization is limited to formatting the text output, but since the main purpose of Airfoil Speakers is playing audio, that’s just fine. In order to provide as much flexibility within that medium as possible, we built the output system around a very simple XML specification. The output is generated in XML and then transformed using a user-definable XSLT stylesheet. The sample stylesheets we include show how you can format the data to consist of anything from multi-colored, human-readable text, to formats designed to be easily parsed by other processes.

Airfoil Speakers shows information on the currently connected audio source, including the name of the machine running Airfoil and the source application that is currently selected as Airfoil’s source. In addition, the CLI client provides notifications for volume changes and track metadata when supported by the selected source.

There are still some features missing from Airfoil Speakers for Linux that are available in other versions of Airfoil Speakers, things like Reverse Connect and album artwork. We’ll see what happens with that in the future. For now, our focus was on getting a client that would allow as many systems as possible to receive audio from Airfoil, and we’ve done just that.

Using Linux? Get Airfoil Speakers for Linux on our Speakers page!


1. So far we’ve tested with the latest 32- and 64-bit versions of Ubuntu, Mint, Fedora, openSUSE and Debian. 

2. We’re providing packages in both RPM and deb formats, as that covers nearly every major Linux distro. In addition, we have a plain tarball available for distros that don’t use those package formats. 

Airfoil 4.7 Brings Menu Bar Mode and More

Airfoil for Mac IconHere at Rogue Amoeba, we get lots and lots of customer feedback. While we can’t act on or implement every suggestion we receive, we consider all feedback in the larger context of future development. It’s always incredibly valuable to hear from our users, and learn both how they use the software and how we might improve it. That’s why we’re delighted to unveil a feature that’s been a growing request for Airfoil.

Airfoil's Menu Bar Mode In Action
Airfoil’s New Menu Bar Mode in Action

For some of you, this will be a very welcome sight indeed, as Airfoil now offers a new global menu. With the release of Airfoil 4.7, we’ve added a setting which enables you to add a system-wide menu containing Airfoil’s essential controls. Just click its icon (as seen below) in the menu bar, and you’ll be able to control Airfoil from anywhere. Even better, you can opt to have Airfoil run exclusively in the menu bar, with no Dock icon. Many of you have asked for this, and now, it’s finally here. Thanks for your patience!

Airfoil's Menu Bar Icon
Just Click Me to Control Airfoil From Anywhere!

By default, Airfoil 4.7 will show up in both the Dock and the menu bar, making it behave like a standard application, while also providing access to Airfoil’s controls from any application. You can adjust this setting in the Preferences window, with the option to have Airfoil appear only in the Dock (as it always has) or only in the menu bar. It’s up to you!

This update also features remote control support for Last.fm’s new betas, as well as many important bug fixes, including the return of the ability to capture audio from Rosetta apps like Radio 365, and a fix for a conflict with Qt-based apps like Sibelius.

Airfoil 4.7 is a free update for all users of Airfoil 4. Just choose “Check for Update” from the Airfoil menu. If you haven’t checked out Airfoil yet, there’s no time like the present. You can download the free trial from Airfoil page.

Piezo’s VU Meters

Piezo’s VU meters are one of the first things people notice when they try it out, and thanks to our designer Christa, the meters are quite pleasing to the eye. I’m the guy who had to make them work though, so I get to tell the story of their creation. To begin with I imagined they’d be simple enough to build, the decibel (dB) values were already provided by Rogue Amoeba’s comprehensive audio code, so I just had to make some needles move? Easy!

Are They Calibrated?

Long before Piezo was done, Quentin asked if the meters would be calibrated, with the warning that this would be the first question users asked when we shipped. I didn’t have a good answer. In fact, I had no idea, so I set out to do some research before I looked too stupid.

What Is a VU Meter Anyway?

Well, it’s not quite what I expected.

Wikipedia says:

Volume Unit (VU) defined: The reading of the volume indicator shall be 0 VU when it is connected to an AC voltage equal to 1.23 Volts RMS (equal to +4 dBu) at 1000 cycles per second.

That’s all true, but it doesn’t explain much, so let’s try some additional information:

Physical VU meters were cheap to manufacture, with a simple mechanism that gave an average of the signal. They were created in 1939, and standards soon followed for many aspects: voltage levels and sine wave frequencies for calibration, the scale, which is in units of dBu (but offset 4dB from what you’d expect), as well as ‘ballistics’ describing the rise and fall time of the needles.

Ballistics are interesting. They dictate that needles should take 300 milliseconds, almost a third of a second, to rise from the lower stop to the zero dB marking. The effect of the ballistics is to make consistent sounds read louder, whilst sharp, percussive sounds will not display as loud as they truly are – similar to our own perception of loud noises.

VU meters were useful for many purposes and widely used in all manner of audio equipment. That said, many meters in consumer equipment had little in common with the true standard, despite having ‘VU’ clearly written on them.

Worth noting, VU meters were not the same as ‘Peak’ meters. ‘Peak Program Meters’ (PPMs) attempted to more accurately reflect fast voltage peaks and had many standards of their own. Analog PPMs were more expensive to manufacture and calibrate, so they were never as common when meters were physical objects. Now that our audio is digital, a computer can provide a true peak meter or an RMS power meter easily, and that’s what you normally see displayed in software. For example, Rogue Amoeba’s own Audio Hijack Pro provides meters in a few places that are switchable between Peak and RMS display.

Piezo’s VU Meters:

Now that I knew what ‘calibration’ meant for a VU meter, I could get down to business. That meant:

* Adding a table of dB values to angles describing the meter’s layout
* Using some math to interpolate between table values and sweep a log scale
* Writing test code to confirm motion and reference marks
* Adjusting sampling frequency and animation speeds
* Offsetting the dB values by that tricky 4dB in the standard
* And verifying against other meters I could find in audio software.

Yep, just as easy as “making some needles move”.  All this took some time, but if we were going to call them VU meters, it was all necessary.

Once the meters were correct, we still had to decide upon labels for the meter and their placement, so that final artwork could be made to suit. Experimentation and a nod to aesthetics led to our final result. Here’s how it looked with my placeholder artwork early on, as test code drew a needle for each possible marking:

Piezo's VU Meter Needles Test
VU Meters B.C. (Before Christa)

Zero dB on the digital scale reads as +4 on the meter, but because the meter values and the needles don’t respond instantly, it doesn’t reach the red zone very often. The ballistics of Piezo’s needles don’t attempt to follow the standard exactly, but they aren’t too far from it. Our testing showed that running the needles too fast made them appear frenzied and tiring to watch. On the other hand, running them too slow made them lag behind the music. Finding the right balance was hard, and required plenty of experimenting. In the end we made the fall time half the speed of the rise time – keeping some of the smooth liquid motion whilst matching peaks in your music.

Piezo's VU Meter Needles Final Version
VU Meters A.D. (After Designer)

Since shipping we’ve had users tell us they keep Piezo’s meters on screen all day because they enjoy them so much.  I think we did alright.

Our Software