8.4 KiB
AUv3 Extension Guide
How to ship a SynthesizerBase subclass as an AudioUnit v3 (.appex)
plugin loadable by Logic, GarageBand, AUM, Loopy Pro, Ableton (via
Bridge), and any other AUv3 host.
Demos/LyrebirdAUv3Demo/ is the working reference. Copy that template,
swap in your synth, change the bundle IDs / component codes, build.
Prerequisites
- macOS 15+ with Xcode 16+ (project targets
MACOSX_DEPLOYMENT_TARGET = 15.0). - Apple Developer Team ID (any free or paid tier works for local testing; distribution needs paid).
- Your synth is a
SynthesizerBasesubclass with one or more@LiveParamproperties. - You understand the
LyrebirdAudioUnitwrapper — seeSources/Lyrebird/Lyrebird.docc/AUv3.md.
Step-by-step
1. Duplicate the demo
cp -R Demos/LyrebirdAUv3Demo Demos/MyPluginDemo
Rename everything under Demos/MyPluginDemo to your plugin name. The
xcodeproj internally references by GUID, not by path, so the folder
rename is safe.
2. Replace the synth
In Demos/MyPluginDemo/LyrebirdFMExtension/LyrebirdFM.swift, replace
the LyrebirdFM class with your own SynthesizerBase subclass.
Stereo output is recommended (mirror the same source onto bus 0 and
bus 1) — most hosts expect stereo from aumu instruments.
3. Wire up the AU subclass
In LyrebirdFMAudioUnit.swift, change:
- The class name (matching the principal class reference in
Info.plist). - The
makeSynthesizer()body to return your new synth. - The
parameterMetadata()table to match your@LiveParamproperties' actual bounds and units. Names must match the property names exactly — Mirror discovery is name-keyed.
4. Update the Info.plist
Change in LyrebirdFMExtension/Info.plist:
NSExtensionAttributes → AudioComponents:name:Manufacturer: PluginName(this is what hosts display).description: short blurb shown in some hosts.subtype: 4-character code unique to your plugin (e.g.MFM1). Must differ fromLBFM/ any other AU you ship.manufacturer: 4-character code unique to your organisation (e.g.ACME). Reuse the same code for every AU you ship.
NSExtensionPrincipalClass: must read<NewExtensionModuleName>.<NewViewControllerClassName>.
5. Update bundle identifiers
In Xcode's build settings (or directly in project.pbxproj), change:
- Container app
PRODUCT_BUNDLE_IDENTIFIER:com.yourorg.myplugindemo - Extension
PRODUCT_BUNDLE_IDENTIFIER:com.yourorg.myplugindemo.MyExtension— must be a strict prefix match of the container.
The extension's AudioComponentBundle Info.plist entry is set to
$(PRODUCT_BUNDLE_IDENTIFIER) so it follows automatically.
6. Signing
Set DEVELOPMENT_TEAM to your Apple Developer Team ID on both
targets (Xcode → Target → Signing & Capabilities). Automatic signing
takes care of provisioning profiles.
For local-only testing you can build with CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO from xcodebuild, but App Store /
Notarization require real signing.
7. Build + run the container app once
Building the container app embeds the .appex into
MyPluginDemo.app/Contents/PlugIns/. Running the app once is what
registers the extension with the system AU registry (via
LaunchServices → pluginkit). Without that step no host will find
your AU.
8. Validate with auval
auval -v aumu <subType> <manufacturer>
For the demo: auval -v aumu LBFM RLZS.
Look for * * PASS in the output. If you see "didn't find the
component", the registration step (7) did not complete — re-run the
container app from Xcode, wait a moment, retry.
9. Host smoke test
Drop the plugin into Logic Pro / GarageBand:
- Track → New Software Instrument.
- Channel strip → Instrument slot → AU Instruments → your manufacturer → your plugin name.
- Open the plugin window. The host's generic UI shows the parameter list (until you populate the SwiftUI view).
- Move sliders, automate parameters, save / load presets — all
work through the
AUParameter+fullStateplumbing.
Common pitfalls
"Build settings: missing SWIFT_USE_INTEGRATED_DRIVER override"
On Xcode 26+ the explicit-module-build system breaks SPM dynamic
framework module resolution: Xcode scans every target's dependencies
before any module is built, and Lyrebird ships as a dynamic library
product (type: .dynamic in Package.swift) whose module map does
not yet exist at scan time. Set SWIFT_USE_INTEGRATED_DRIVER = NO
on every target to fall back to the classic sequential driver, which
resolves modules at compile time. The demo's project.pbxproj does
not bake this in — add it in your project's User-Defined build
settings or pass it on the command line. Revert when Apple fixes the
explicit-module scanner to generate C target module maps before
dependent Swift targets' dependency scans.
"Swift package target 'Lyrebird' is linked as a static library"
Only link the LyrebirdUI SPM product, not Lyrebird directly.
LyrebirdUI declares Lyrebird as a transitive dependency, so the
binary surface area is identical, but the static-vs-dynamic conflict
disappears. The demo's LyrebirdFMExtension target links
LyrebirdUI only — and that is enough; the Lyrebird module is still
importable.
"AU instantiated but no audio"
- Confirm the AU host is sending audio render calls (some hosts only
render when a MIDI event has fired). The base demo ships no MIDI input
handler — output is silent until you parameter-automate
ampup AND a way to gate notes exists (which you have to build, since the demo'sLyrebirdFMis a free-running oscillator that always sounds at the carrier frequency × amp). - Confirm
parameterMetadata()names match your@LiveParamproperty names exactly. - Confirm both stereo channels receive output (
output(bus: 0, ...) output(bus: 1, ...)).
"auval crashes / hangs"
Almost always the principal class is wrong. The NSExtensionPrincipal Class Info.plist string must read <ModuleName>.<ClassName> where
the module name matches the extension target's PRODUCT_NAME (which
is $(TARGET_NAME) by default, so the target name itself).
Aux output + sidechain input
- Multi-output busses — override
LyrebirdAudioUnit/lyrebirdOutputBusseswith an array ofLyrebirdAUBusSpec. Hosts (Logic, AUM, MainStage) expose each bus separately in their routing UI. - Multi-input busses — override
LyrebirdAudioUnit/lyrebirdInputBussesfor sidechain inputs.AUInput.Audio(busIndex: 0, channel: ch)reads main,busIndex: 1reads sidechain. - Engine bus layout — outputs first, then inputs, each block
contiguous;
SynthesisEngine.auOutputBusOffsets/auInputBusOffsetsmaps AU bus index → engine bus index. - Single-bus subclasses are untouched — defaults
derive from the existing
lyrebirdOutputChannels/lyrebirdInputChannelsclass vars.
MIDI input, SwiftUI UI, presets, effect-type AU
- MIDI input —
au.midiHandlerclosure receives parsedMIDIMessagefrom the host'sAURenderEventchain. For polyphony useLyrebirdAUVoicePoolBindingwith aVoicePool. - SwiftUI parameter UI — drop a
LyrebirdSynthViewinto your AU view controller; it walks the synth'sMirrorfor@UIParamslots and renders oneParameterKnobper slot. - Source-slot preset serialisation — conform your slot-source
generators to
LyrebirdAUPresetCodableand register them withLyrebirdAUPresetSourceRegistrybefore instantiating the AU. - Effect-type AU (
aufx) — overrideLyrebirdAudioUnit/lyrebirdInputChannelsto a positive value and read host audio inbuild()viaAUInput/Audio.
Out of scope
- Aux output / sidechain busses — see the dedicated section above.
- MIDI 2.0 UMP — AU base reports MIDI 1.0 protocol.
- Per-sample AU parameter automation ramps — host writes still apply at the next sub-block boundary via the standard atomic ramp path.
- App Store distribution / notarization workflow — outside Lyrebird's scope; follow Apple's standard Distributing your app on the App Store guide.
See also
Sources/Lyrebird/Lyrebird.docc/AUv3.md—LyrebirdAudioUnitAPI reference.Demos/LyrebirdAUv3Demo/README.md— reference demo walkthrough.