The Amazing Audio Engine Documentation

The Amazing Audio Engine (or TAAE) is a framework for making audio apps.

What TAAE Is, And Who It's For

TAAE comprises an infrastructure and a variety of utilities that make it easier to focus on the core tasks of generating and working with audio, without spending time writing boilerplate code and reinventing the wheel. Most of the common tasks are taken care of, so you can get straight to the good stuff: no friction.

If you're writing code that directly generates or processes audio on the audio thread - and you know what the audio thread is, and what it does - TAAE may be for you.

What TAAE Isn't

TAAE is not a comprehensive audio processing library where all the work is already done for you, and it's not necessarily a suitable choice for those just starting out with audio, or for those with very simple needs.

With TAAE, you're going to write code that runs on the audio thread; it gives you great power, but that comes with certain important responsibilities.

If you don't know or aren't keen on finding out what the audio thread is, what 'realtime' means, what an AudioBufferList is or how to handle lock-free concurrency, or if you want a library that consists of pre-built pieces you can just fit together, then I strongly recommend checking out AudioKit, a powerful audio synthesis, processing, and analysis library without the steep learning curve.

TAAE's Design

TAAE 2's design philosophy leans towards the simple and modular: to provide a set of small and simple building blocks that you can use together, or alone.

TAAE 2 is made up of:

Block Diagram
AEBufferStack The pool of buffers used for storing and manipulating audio. This is the main component you'll be working with, as it forms the backbone of the audio pipeline. You'll push buffers to generate audio; get existing buffers to apply effects, analysis and to record; mix buffers to combine multpile sources; output buffers to the renderer, and pop buffers when you're done with them.
AERenderer The main driver of audio processing, via the AERenderLoopBlock .
AEAudioUnitOutput The system output interface, for playing generated audio.
AEAudioFileOutput An offline render target, for rendering out to an audio file.
AEModule A unit of processing, which interact with the buffer stack to generate audio, filter it, monitor or analyze, etc. Modules are driven by calling AEModuleProcess(). Some important modules:
AEManagedValue Manage a reference to an object or pointer in a thread-safe way. Use this to hold references to modules that can be swapped out, removed or inserted at any time, for example.
AEArray Manage a list of objects or pointers in a thread-safe way. Use this to manage lists of modules that can be manipulated at any time, or use it to map between model objects in your app and C structures that you use for rendering or analysis tasks.
AEAudioBufferListUtilities Utilities for working with AudioBufferLists: create mutable copies on the stack, offset, copy, silence, and isolate certain channel combinations.
AEDSPUtilties Digital signal processing utilities: apply gain adjustments, linear and equal-power ramps, apply gain or volume and balance adjustments with automatic smoothing; mix buffers together, and generate oscillators.
AEMessageQueue A powerful cross-thread synchronization facility. Use it to safely send messages back and forth between the main thread and the audio thread, to update state, trigger notifications from the audio thread, exchange data and more. The message queue is built from:
  • AEMainThreadEndpoint: A simple facility for sending messages to the main thread from the audio thread.
  • AEAudioThreadEndpoint: A simple facility for sending messages to the audio thread from the main thread.
AECircularBuffer Circular/ring buffer implementation that works with AudioBufferList types. Use this to buffer audio to work in blocks of a certain size, or use it to transport audio off to a secondary thread, or from a secondary thread to the audio thread. Fully realtime- and thread-safe.

Read about the Buffer Stack and audio processing next.