Month: November 2007

  • Audio Units

    I’m going to spend a moment explaining how I got something to work on my Mac. It’s a little tech-heavy and jargon-laden, so please skip if you don’t want to exercise those muscles.

    Doing all this stuff arises out of solving a problem I didn’t have initially. Don’t you hate that? The problem I was trying to solve was how to minimally allow streaming audio conversations over the network, without using something like Skype. When I figure that part out, I’ll be sure and let you know.

    The problem: Use more than one USB audio input source to record using GarageBand (or to broadcast over Skype, or Second Life, or whatever). (GarageBand is Apple’s audio recording and editing app, and it’s pretty k-rad, especially since it comes with your Mac.)

    The solution: AU Lab and Soundflower.

    I have a USB headset (which is actually a mini-plugs headset with a USB adaptor, but who’s counting), as well as a Griffin iMic. But really, this can apply to any audio on any Mac running OS X.

    Step One: Install the Developer’s Tools. For some reason, Apple decided to put all the really cool and useful stuff on the Developer’s Tools disc. For instance Quartz Composer. But really, what we’re interested in is a buggy piece of almost-ware called AU Lab. If you don’t have a Developer’s Tools disc, you can download one for free by signing up with Apple’s Developer Connection. And you’re the kind of nerd who already did this, aren’t you? Yes, you are.

    ‘AU’ stands for Audio Units, which is Apple’s low-latency audio architecture. It competes with other similar projects such as OSS, ALSA, and jackit, but is also compatible in some ways. So AU Lab is basically a demonstration of what you can do with AU. But it’s also pretty darn useful, and is free.

    So now that your Mac has the DevTools installed, you download and install Soundflower. Soundflower is a loopback device. All it does is take an input and make it available to an output. It can do this for two channels, or for 16 channels. We’ll stick to the 2 channels, but I’m getting ahead of myself.

    What’s so useful about Soundflower is that it lets you set an output device for one app that can be the input device for another. So for instance, if you set GarageBand to have your microphone as an input, and Soundflower as an output, you can then apply effects to your voice for other applications, such as voice chat on Second Life or Skype. You’d set Soundflower as the input to the voice chat. See? No? Well forget about it then. Go read something else, because it’s about to get a lot more complicated.

    So let’s say we want two inputs to go into Soundflower, for subsequent piping to some other app. Soundflower doesn’t let you do this; it can only deal with one input. This is also a limitation of GarageBand; it can’t mix inputs. So we need a mixer.

    And that mixer will be AU Lab. AU Lab even adopts a mixer metaphor: It looks like a physical audio mixer like you’d find in a recording studio. But even then…. It only works per device. It was designed for demonstrating the technology, not to be perfect. I think Apple wanted to encourage someone else to make the real app.

    So. This leaves us with the last piece of the puzzle: Aggregate Devices.

    Apple’s sound architecture allows you to group devices into aggregates. So for instance my Mac has a built-in sound system (two speakers, stereo line/optical in, mic on the lid, for a total of 5 channels). I also have an iMic (two in, two out), and the headset device (two out, one in). I could (and have…) create a single aggregate device that includes all of these in and out channels. Or just some… Say I want to input from the iMic and the headset mic, I make an aggregate device with an output (soundflower, usually), and the two input devices.

    How do you make an aggregate device? With Audio MIDI Setup, of course! It’s located in /Applications/Utilities. When you run it, you’ll see a menu item: Audio -> Open Aggregate Device Editor. A sheet pops down over the window. Click the + to add one, give it a name, and then start ticking off the devices you want to include.

    In this case, Soundflower, iMic input, and headset input.

    It should also be noted that you have to do this for all devices on an Intel Mac. Apparently the hardware is ahead of the software in this regard. On Intel Macs, for instance, the Built-In Output is not automatically associated with the Built-In Input. Crazy, yes, but there you go. You must make an aggregate of the two if you want them to act as one.

    So you’ve aggregated your devices, and given that aggregate a good name (I chose ‘soundflower imic headset’). Now you run AU Lab and prepare for another learning curve.

    Because AU Lab kinda sucks. It inspires me to write a better version, which of course I’ll never do. Anyway.

    You run it, and it asks you for an output device. Choose the aggregate device you just created and click OK.

    Now you’ll see a master output channel, complete with panning and fader and mute button. Just like a real mixer. w00t. This represents your output device, whatever it may be. In our case, whatever gets fed to this output will be going out to Soundflower (and subsequently to whatever other app we choose). It could also be going out to your speakers or headphones or whatever, depending on how the aggregate device is set up.

    So let’s add some inputs. We do this from the Edit menu: Edit -> Add Audio Input. We see a similar dialog box to the previous one. But this one’s a little more tricky. In my case, it shows five inputs available (the rectangles in the middle of the box). The first two inputs are provided by Soundflower, and in this case they’re labeled as such. We don’t want inputs from Soundflower; we want the other three. But channel #3 is mono, and #4 and #5 are stereo. This is a problem because the user interface sucks. I will leave it as an exercise to discover why this is, and offer only the solution: Put the popup in Mono, and delete everything, then add everything, and then switch mono to stereo in the places you want it, and delete the channels you don’t want. These directions will make sense if you try it.

    Then save the document, because you don’t want to have to go through that again, do you?

    So. Conceptually, here’s what we’ve got:

    iMic + headset + Soundflower => Aggregate

    Aggregate => AU Lab for mixing => Aggregate

    Now run GarageBand, set its input to the aggregate device, and hit record. Which adds:

    Aggregate => GarageBand

    Wasn’t that easy?

    For further conceptual overload: AU Lab also gives you access to a jillion other Audio Units-based effects and transports. Which means that, for instance, if you have two Macs on a network that both run AU Lab, you can connect the two and stream audio between them for whatever purpose you have in mind, nefarious or otherwise. AU Lab lets you group inputs into busses with their own mixes and effects sends (pre and post), and on and on. It’s a very cool technology, and it’s a shame that there aren’t more routing/mixing apps available than just AU Lab.

  • Second Life: Uhm…

    sl_grammaphone_moon

    Building a grammaphone by moonlight.

    sl_desert_island_collection

    And really, if you *could* have this, why wouldn’t you?

  • Second Life: O So Sad

    In real life, if someone starts up a business, like maybe a store or a factory or whatever, there’s infrastructure involved. You rent a storefront, or build a retail outlet, or retool a factory… You get the idea.

    When you start a university, you need a campus. And the thing is, the university has to come first; there’s no need for the campus without the university.

    Simple concept? Good.

    Ladies and gentlemen, I give to you the improbably-named Museum of Distance Education and Tech.

    sl_museum_distance_ed

    Yes, Distance Education now belongs in a Museum.

    Furthermore, the museum is a fake building in a virtual world, and is completely empty. I’m trying to figure out if this is some kind of joke or what.

    An autogreeter gave me this notecard:

    Welcome!

    Please explore our campus – we have a museum, an art gallery, stores, an outdoor theater, a cafe, a library, and office space.

    Welcome all educators, musicians, artists, visitors!

    We will be holding various events in the coming months, so please join our Group and we will send you a notice when we have new events coming up.

    Thanks for stopping by.

    Ross Mounier
    CEO

    Does it not inspire you to learn, at a distance?

    I’m being mean, of course. Most places in SL are completely empty until someone holds an event, then they fill up. But I see no indication that anything has happened here since it was built in July. I joined the group, and there are 46 members with zero notices of anything having ever happened. At all.

    Rhetorica, on the other hand, has the advantage of being based on a real educational program already in place. See simple concept above for details. It also has SL-friendly architecture.

    Also, nice and empty, with sandbox.

  • The Android Sisters

    (I’m re-upping this because I feel bad for neglecting to link to its source: ZBS. This track is from Ruby: Galactic Gumshoe, which you can buy for $10 as MP3 downloads, which is pretty good for three hours of psychedelic radio drama.)

  • Laughingstock

    Digby:

    Capitol Hill hasn’t become the laughing stock of the nation because of its partisanship. It’s become the laughing stock of the nation because the Republicans have spent the last seven years diagnosing brain injuries from the floor of the senate, molesting high school boys, stealing the country blind and starting wars for no good reason (all of which the Republicans seemed to “get done” very handily [despite partisanship].) In the eight years before that they spent the entire time obsessing about phony scandals and semen stains. If we don’t laugh we’ll never stop crying about what they’ve done to our country.

  • In The Forest

    Fall Trillium

    I had to leave.

    The cat woke me up after four hours’ sleep, and I was grouchy. “That’s it. I have to get the hell out of here.” Only I didn’t say ‘hell.’ You get the point.

    Still groggy, I reserved the Flexcar. I gave myself two hours to get to the car, during which time I argued with myself… Is this too much money to spend on such a thing? It’s just silly. I should call and cancel. An hour later I was in the car, driving north, and then east up state route 2.

    The trailhead to Lake Dorothy is right at the per-day mileage limit for Flexcar. It’s the farthest you can go in the cars that are nearest where I live. Google Maps told me this, and the trip odometer confirmed it. The trail itself is only a mile and a half to the drainage end of the lake, but it gains about a thousand feet elevation (ending up at 3000 ft. or so). Much of it is… Well, here, look:

    Dorothy Lake Trail #1072

    It’s a stair climb, about as much as not. But it’s a lovely stair climb. And there’s the moment when you come out of the forest onto the bridge that crosses the river right where three creeks converge, of which I don’t have any pictures, because I was too busy eating my Clif bar and soaking in the surroundings. Here’s one someone took

    In 2005, hiking over Cutthroat Pass, I managed to torque my knee. It’s never really been all that happy with walking since then. It tires out before the rest of me does, and starts complaining. I’ve been dealing with it by only going on short hikes (when I’m hiking at all..). But yesterday, hiking up to Lake Dorothy, I debuted my hiking sticks, which are basically ski poles (in fact, this set is supposed to be for snowshoeing). The difference is quite amazing.

    First off, I bombed up the first, relatively flat section to the bridge almost at a run, using all four limbs. I was almost literally galloping. I even had a dream about it the next night, galloping like a horse. Of course the early burst was a mistake, because then I was out of energy too soon. But it was fun. And no complaints from my knee. Until much later, and not even really then.

    Nurse Log Detail

    The forest is very wet and green. In most places, early November doesn’t mean green, though it might mean wet. But this is a landscape of mosses and evergreens, and few leaves fall in autumn.

    Breathing in this air, and sipping in the water, and crossing the boundary into officially-designated Wilderness, my perspective switched around. Something inside me came unwound, like the rubber band on one of those balsa wood airplanes from childhood: PHHHHHhhhhthpthpthpthpthp… Gradually pumping out with the sweat. Choose your own metaphor: I could inhale unrestricted.

    The trees get larger the higher you go. Older and older, higher and higher into the sky. Paradoxically, this is inversely proportional to the thickness of topsoil. Just a few inches of nutrients support the roots of giant trees, and all the rest of it, too.

    I am, actually, here on a mission, which won’t be revealed here. I’m not actually headed to the drainage end of the lake, though I should have gone there. Maybe next weekend. But having reached the point where I could fulfill the mission, I started back down, and this is when things started getting really interesting.

    Evidence Of Impending Winter

    I live at just a little bit above sea level. I was now at something like 2500 ft, which isn’t that high, but the air is noticeably thinner and I’m perpetually out of shape. Everything is slick. Some places in the trail are muddy. I’m profoundly alone, since I’ve passed enough parties to match the number of cars that were parked at the trailhead. My pack isn’t heavy, but it’s not light, and contains expensive, delicate equipment.

    It’s in this context that I started down the mountainside, slowly at first. I get into a rhythm… My knee doesn’t complain when I land on it, only when I bend it, so I use a special gait to go down these steps… Poles forward, left foot step down, right foot (and bad knee) for stability, repeat. The ‘steps’ vary in size, so some adjustment to gait is required. I’m dancing down the mountain.

    I get into a groove. Poles, foot, foot, poles, foot, foot… A three-legged waltz. Gradually, without really noticing, I’m speeding up. Downhill is really downhill here, so momentum can carry me forward as quickly as I please. I’m not really as conscious as I could be. I’m feeling the movement, in my body, trees and mosses and boulders just zipping past; I’m concentrating on the terrain of the trail. I’m in this state. You hear about athletes in ‘the zone,’ and that’s about where I am.

    I stop to rest, and realize just how far I came in such a short time. And then, completely out of left field, my mind gives me this:

    Collaboration is structured social activity.

    I start thinking about some people I met on Second Life, and how I want to collaborate on a project. And there it is: Collaboration is structured social activity. It has a purpose upon which everyone agrees, and so therefore everything happens in that context. I think about some of the things I’ve said in the past when I’ve talked to myself. How this not-quite-babble was sometimes me talking with a collaborator… My brain’s been trying to tell me this for a long time.

    Drink some water, eat another half a Clif bar. Grin stupidly. Say over and over to myself, “Collaboration is structured social activity…” A reassuring mantra, something obvious masquerading as something profound.

    Glide on down the trail. Beyond the region of stairclimbing, down to where things look more like a trail through a forest. But the pace is still fast, the rhythm of it and enjoyment of the concentration propelling me forward. Over rocky terrain, around tree stumps, across creeks…

    And then, just before getting to the trailhead, a slip. The heel of my boot lands on a wad of mud clinging to a log. Mud-as-banana-peel. Inevitable. Had to happen. My booted foot slides down to the ground, I struggle to keep balance. Heavy-ish backpack. The small of my back says, “Uh…. Ow?” I worry that it’ll start spasming, which it does sometimes. I don’t fall, my back doesn’t spasm and leave me helpless.

    The fragile human form. I walk at a more moderate pace the remaining fifty yards or so to the car.

    Tiny Branch

  • Where Are We? Brownshirts Edition

    Freepers, the Brownshirts of radical conservatism.

  • More Walking

    Yesterday I rented a car and hiked up most of the way to Lake Dorothy. This meant that I walked about three and a half miles to the car, drove it for an hour and a half, hiked up the side of a mountain for a mile and a half, then the mile and a half back, drove the car back, and then walked three and a half more miles back home.

    I actually walked more in the city than on the trail. Har. But the trail was much more transformative. Trip report follows.

    A 10-mile day, three over real terrain. Not bad. Now to go buy some glucosamine…

    Burke-Gillman Trail

  • Second Life: Promotion

    Well, my storefront lease in SL expires tomorrow. I’m not going to renew it, because the experiment is over.

    *No one* linked through to this blog from the promotional material, even though 23 received it. Yes, there were 23 recipients; I’m not making that up.

    My philosophy on SL in the past little while has been to say yes to whatever. So while I was looking at my storefront, another promotional gimmick was being demonstrated in the courtyard down the way, and it works like this:

    There’s a guy on SL who sells gold nuggets. He has a web site: SL Goldrush. He sells you a nugget for L$200 (about US$0.90). It lasts for 3 days before deleting itself. You hide it in your store. Other users go to the web site and find the list of nuggets. They go on a little treasure hunt, and the nuggets pay out up to L$5, with a (very) random jackpot that’s in the four digits. The math for the guy who’s doing this is very good… Assuming a maximum payout, that’s 40 finds before he starts losing money. Mine was out for three days and got about 20 finds, and wasn’t very well hidden. And there are 262 people who’ve bought the things, at the moment. (They are euphemistically called ‘sponsers’ (sic) on the web site.)

    The idea is that these treasure-seekers end up at your store, poking through your stuff, in order to find the nugget. And while it’s true that these people would teleport in and search, they just wanted 5 easy Lindenbux, and didn’t care what I was hawking. Some have developed scripts that scan for the nugget automatically.

    So basically it’s a rip-off.

    Speaking of rip-offs….. Cortex Island. I spent a while poking around there today. It’s a giant office park. It’s from the golden age of SL hype. A number of big companies have a presence there (Corbis, 1800flowers.com), and a few smaller ones. And it’s completely, utterly, overwhelmingly empty.

    Imagine walking into an office park where the fountains and shrubbery are running on autopilot, where there are no people, and where all the doors are left open because there’s no way to steal anything. Enter into the SL office of Corbis, and there’s a reception desk but no receptionist. The place looks spotlessly clean, as if everyone’s just out on a lunch break and will be back any second. There are magazines on the table in the waiting room. There’s a meeting room visible behind glass walls, where chairs are arranged just so, so that they appear to have been recently used. The office has two stories, because…. Well why? No good reason. Offices are supposed to be like that, so this one is, too. There are some displays where you can browse through Corbis’ stock of images (they’re a stock photography company). There are maybe 8 of these displays, with the assumption that when you’re using one, there needs to be room for the next 7 customers who are hot on your heels.

    Like that. It’s kind of spooky. Someone convinced someone else at Corbis that this was a wise decision. And so the builder gnomes of SL built this place, and apparently Corbis et al are still paying.

    There are places like this in real life, too. They’re not that hard to find, if you know what you’re looking at.