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
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
AttackNote()
now returns abool
- This allowsSynthElement
to not place aSynthNote
instance into the active queue if the note will not be played (due to voice logic of any sort).AttackNote()
argument 4 (inAbsoluteSampleFrame
) changed fromSInt64
toUInt64
- Start frame is always positive, and is unsigned in other uses in the system. This also allows more frames before value will wrap.Render()
takes an additional argument, the first argument is:inAbsoluteSampleFrame
- This is to allow a subclass to handle the "will this note play" logic (see AttackNote()).Attack()
now returns abool
.GetState()
returnsSynthNoteState
enum type - The member value being returned is this type.GetAbsoluteStartFrame()
now returnsUInt64
instead ofSInt64
- Start frame is always positive, and is unsigned in other uses in the system.PitchBend()
is nowGetPitchBend()
- Old name was misleading -- sounded like it performed an action when this is just a 'getter'.SampleRate()
is virtual - LikeFrequency()
the subclass may want to override this.
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 additionalinAbsoluteSampleFrame
andAUScope &
arguments - Sample frame is needed to allow a note to keep track of its exact place in its playback timeline. TheAUScope
allows different notes to play back via different output busses.NoteOff()
has been madevirtual
.
Document Revision History
Date | Notes |
---|---|
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. |
Copyright © 2011 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2011-11-29