Technical Note TN2291

AUInstrumentBase changes for Mac OS X Lion

This Technical Note lists changes made to the AUInstrumentBase classes for Mac OS X Lion. When building an Audio Unit on Mac OS X Lion that make use of these public utility classes, you will need to update your project accordingly.

Introduction
AUInstrumentBase
SynthNote
SynthElement
SynthGroupElement
Document Revision History

Introduction

The AUInstrumentBase folder is part of the Xcode Developer tools and is located in Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUInstrumentBase. This folder contains a number of classes used when building Audio Unit Instruments.

A number of changes have been made to these public utility files for Mac OS X Lion as listed:

AUInstrumentBase

New Methods

  • AUScope & Parts()

  • AUElement* GetPart(AudioUnitElement inElement)

  • virtual AUScope* GetScopeExtended(AudioUnitScope inScope)

  • virtual void CreateExtendedElements()

These methods allow subclasses to make use of the Part scope which represents specific instruments, patches and presets associated with the AUInstrumentBase.

Methods Removed

  • MidiControls* GetControls( MusicDeviceGroupID inChannel)

MIDI notification messages are handled via methods called directly on the appropriate SynthGroupElement instance.

SynthNote

SynthElement

Methods Removed

  • GetName()

  • SetName()

SynthElement is derived from AUElement which already has these methods and they are non-virtual. Overriding at this level could produce inconsistent results.

MidiControls

MidiControls has been promoted to be a subclass of a new base class called MIDIControlHandler which defines a useful interface for working with MIDI events. The constants have been moved into the base class header.

SynthGroupElement

New Methods

  • virtual NoteOn()

  • NoteFastReleased()

  • ChannelMessage()

Methods Removed

  • GetOutputBus()

  • SetOutputBus()

For a multi-channel instrument, the concept of a single bus index does not make sense. This state is better handled by subclasses.

Other Changes

  • Render() takes additional inAbsoluteSampleFrame and AUScope & arguments - Sample frame is needed to allow a note to keep track of its exact place in its playback timeline. The AUScope allows different notes to play back via different output busses.

  • NoteOff() has been made virtual.



Document Revision History


DateNotes
2011-11-29

New document that describes the changes made to the public utility files that are part of the AUInstrumentBase folder for Mac OS X Lion.