Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Fun with Audio Units System 10.4
Tiger only hintYou can do some mighty cool stuff with the new audio system in Tiger. Want to apply realtime AudioUnit effects such as reverb or pitch to your main sound out? Or perhaps you want to have quadrophonic sound by connecting two sound systems to your computer? Read on... Here's how to play with real-time Audio Unit effects:
  • Install the freeware Soundflower. You'll need this for virtual sound channels. It's a nifty tool; check it out even if you're not going to use it for this. Might require reboot to activate.
  • Install Apple's Developer Tools. Even if you're not a developer, there's some real nifty stuff on there (Quartz Composer, etc.). What we want is the AU Lab application.
  • Open up Audio Midi Setup (in /Applications/Utilities). In the Audio menu, go to Open Aggregate Device Editor. This lets you stuff audio streams together as if they were one single device. Create a new aggregate device, name it "Virtual + Built-in" or whatever. Put the Soundflower virtual device first (2ch or 16ch, doesn't matter), THEN the built-in audio (you can drag and drop). Don't forget to check the "Use" buttons!
  • Click Done. Set the Default Output dropdown to the right to the new virtual device. Now you won't hear sound for a lil' while.
  • Open up the nifty AU Lab tool over in /Developer/Applications/Audio. You'll now be wanting to create a new document. Use these settings:
    • Audio Device: "Virtual + Built-in" (or whatever you named it).
    • Outputs tab: Drag the red box to the two channels in Stream 2, these will be at the far right, either 17 and 18 or 3 and 4.
    • Inputs tab: Click the "(+) Add Input" and drag that little red box to channel 1 and 2 in "Soundflower Input Stream #1". Click OK.
    You should now be able to hear sound again.
  • In the small green boxes with a "B" button before them in the Effects section, you can now add effects. I'll let you play with that on your own.
You could've done all this stuff with Audio Hijack Pro, too, but this way is more fun. To revert these settings, quit the Au Lab tool, and then just go to the Sound System Preferences panel, click the Output tab, and choose 'Built-in.' You can also remove Soundflower using the uninstaller on its disk image.

Read on for a 'bonus hint' to create "Quadrophonic" sound...

How to create Quadro-or-whatever-phonic sound ... so you're sitting there with both Built-in audio out and your shiny USB sound system. What a shame that you can't combine them to have four channels of sound. Or wait! You can! You might already have guessed how:
  1. Plug two speakers to the usual headphone jack on the computer.
  2. Plug two speakers to your USB/Firewire (an iVoice with stereo out or whatever)
  3. Open Audio Midi Setup
  4. Menu Audio: Open Aggregate Device Editor...
  5. Press the shiny "+" button (they're all shiny, aren't they?). Name the new aggregate device "I Can't Believe It's Not Surround!" or whatever.
  6. Put a box in "Use" for Built-in Audio and another box at the device corresponding to your USB device. (Checking Soundflower won't be much use, as those are virtual outputs, dummy...).
  7. Drag the device that you want as front speakers above the device that you want as rear speakers. Press Done.
  8. Properties For drop-down: Select your new aggregate device
  9. "Configure Speakers"-button
  10. Check all the checkboxes in the box at the top
  11. "Multichannel"
  12. "Stereo" dropdown
  13. choose "Quadrophonic"
  14. Click the buttons to make sure you get sound. Beware, the buttons are laggy. Don't click like a maniac.
  15. Press Apply and Done.
  16. Default Output: [name of your new aggregate device]
Congrats! You now got almost-surround. Go play some DVDs!

[robg adds: I tested the first part of this hint, but not the second. The first part worked well, and there are tons of settings to tweak for each Effects setting. Quite fun, if not entirely productive :) ]
    •    
  • Currently 3.00 / 5
  You rated: 3 / 5 (6 votes cast)
 
[41,066 views]  

10.4: Fun with Audio Units | 10 comments | Create New Account
Click here to return to the '10.4: Fun with Audio Units' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Fun with Audio Units
Authored by: gr8tfly on May 02, '05 05:47:33PM

I wasn't able to get it routed through Sunflower. However AU Lab works fine running from LineIn with 10.4 without any additional s/w. All the AU effects work fine, real-time. Thanks for the tip pointing me to the AU Lab - now I have some real-time audio DSP capability for my Amateur Radio transiever audio.



[ Reply to This | # ]
10.4: Fun with Audio Units
Authored by: nevyn on May 03, '05 10:53:08AM

Sure, it works great with any external audio source without meddling with Soundflower and stuff. Just launch AU Lab and play around :)

The hint is for getting the sound from all your applications, say, iTunes, and play them through AU Lab and through Audio Unit effects.

---
?



[ Reply to This | # ]
10.4: Fun with Audio Units
Authored by: mugget on May 10, '05 09:29:21PM
i got stuck on this step...
Create a new aggregate device, name it "Virtual + Built-in" or whatever. Put the Soundflower virtual device first (2ch or 16ch, doesn't matter), THEN the built-in audio (you can drag and drop). Don't forget to check the "Use" buttons!
how exactly do you add the Soundflower virtual device to the aggregate device??

[ Reply to This | # ]
10.4: Fun with Audio Units
Authored by: AH on Mar 04, '06 01:19:56PM

... I used this hint a lot and really loved it!

But now, I have a New iMacIntel and Soundflower doesn't work with it.
I miss it so much I downloaded the Source to try to build an universal with Xcode, but I failed totally (like I expected).

Maybe someone more capable comes around and gets it done,
or the developer builds an universal some day...



[ Reply to This | # ]
10.4: Fun with Audio Units
Authored by: AH on Mar 06, '06 09:38:03AM

... I found a mac intel version here: http://www.uneasysilence.com/archive/2006/02/5520/

It works!!! :o)



[ Reply to This | # ]
Log in as admin
Authored by: qxgnxamy on Dec 14, '06 08:04:34AM

I needed to log in as in as an administrator in order to get steps 3 and 4 to work.

Reverb makes the Empire Strikes Back soundtrack sound fantastic! I can't wait to try more CDs.



[ Reply to This | # ]
Sound Breaking Up
Authored by: qxgnxamy on Feb 13, '07 11:21:10PM

After leaving the audio engine running for a few hours or so the sound starts breaking up. Has anyone else been experiencing this problem? It's easily fixed by stopping the audio engine (click on the "Audio Engine Running" text in AU Lab) and starting it again. But is there a way to prevent this from happening entirely?



[ Reply to This | # ]
10.4: Fun with Audio Units
Authored by: devnevyn on Aug 19, '07 05:18:15PM

I can't believe I forgot to add the best part. To stream audio from one machine to another; streaming machine (the machine that will you want to stream audio from):

  • Set output device to Soundflower
  • Open AULab and use Soundflower as input device for a new document
  • On the input channel, add the effect AUNetSend.
  • Mute the master channel. Done.

On the receiving (the machine with the speakers) machine:

  • Open AULab and create a new document (settings don't matter)
  • Edit -> Add Audio Unit Generator; add a AUNetReceive
  • Configure the new AUNetReceive to connect to the streaming machine. Done!

This method has some serious problems though. First off, the streamer is the network host, and not the receiver, which feels a bit backwards and makes network configuration difficult. Secondly, AUNetSend has a tendency to sometimes stall for a short period of time, and then not compensate, so that all the audio gets lagged. It does this now and then, so that if you don't regularly disconnect and reconnect, you end up with minutes of lag.

---
I'm really user:nevyn but I forgot my password.

[ Reply to This | # ]

10.4: Fun with Audio Units
Authored by: qxgnxamy on Mar 08, '08 12:42:25PM

Can anyone figure out a way to use apple's HRTF processing through the 3dmixer audio unit?



[ Reply to This | # ]
10.4: Fun with Audio Units
Authored by: kanenas on Dec 21, '08 01:17:40PM

As a semi-practical application of this technique, you can send the filtered audio stream to a VoIP app (such as Skype or iChat) to disguise your voice. In iChat, this goes well with backdrops and video effects. Of course, the person at the other end could use the same technique to undo some of the effects (such as pitch shift). Hypothetically, you could implement an analog audio scrambling system using custom filters and AU Lab on both ends.



[ Reply to This | # ]