JG Electronics

Pink Noise Generator

Audio Unit Programming Guide.

Apple’s document that describes Audio Units.

Audio units are plug-ins that handle audio data. Plug-ins are extensions that add extra or specific abilities to software applications. Plug-ins are stored in the system library as components that can be loaded by several kinds of applications.

Pink Noise Generator is an application that makes use of the Apple example plug-in AU ‘AUPinkNoise’.


The Apple example AUPinkNoise.

The Apple example project AUPinkNoise will build an audio unit generator that creates a pink noise output.

As you download the AUPinkNoise project from Apple you get a project for Mac OSX10.6.

Because the app Pink Noise Generator is build for Mac OSX10.7 Lion we have to build the AUPinkNoise audio unit generator for Mac OSX10.7 Lion as well.

Apple’s Technical Note TN2276 describes how to update an existing Audio Unit for Mac OSX10.7 Lion.

If you follow the steps in TN2276 then your audio unit plug-in will be backwards compatible with OSX10.6. In the Pink Noise Generator Project there is the updated AUPinkNoise project.

If you want to update another AU project then you will find that some steps described in the TN2276 are not very clear. Watch the following steps / listings.

Listing 1. no problem.

Listing 2. place _FilterFactory on a new line and place a new line behind it.

Listing 3. don’t copy and paste the audio components dictionary in the plist but extent the plist in XCode.

Listing 4. no problem.

Because uncompressed audio data is 32 bit I think the projects should be 32 bit as well. If an application is 64 bit and the audio unit is 32 bit it will not work together.

Place the AUPinkNoise.component in the folder: YourHardDisk / Library / Audio / Plug-Ins / Components /.


The Application Pink Noise Generator

The Pink Noise Generator project will build a application that generates a pink noise audio signal.

The project consists of two Audio Units, the pink noise generator and the default output device, set up and connected together in an Audio Graph.


Pink Noise Generator is full Cocoa and that means all classes end on .m.

The MVC design pattern is followed, there is a Controller and Model class.

The build requirements for the Pink Noise project are Mac OSX10.7 and XCode4.1

The runtime requirements are Mac OSX10.6 or later.


The application icon is from Vincent Garnier.

http://benjigarner.deviantart.com/art/Fruity-Apples-80805804


If you have questions about programming topics please ask these questions on a developer mailing list from Apple. There you find people with far more knowledge then I.

For questions concerning Core Audio goto: coreaudio-api@lists.apple.com

For books about the foundation of Cocoa Programming visit: www.bignerdranch.com

Other useful books:

C++ From the Beginning, author Jan Skansholm.

Cocoa Programming Developer’s Handbook, author David Chisnall.

Core Audio, authors Kevin Avila and Chris Adamson.


If you have remarks or if you find bugs please send me an email: jgelectronics@icloud.com


Click on the picture to download the application and the source code.


Happy Coding!


John

© JG Electronics