apple-audio

Build real-time audio graphs, DSP, and AUv3 plug-ins with AVAudioEngine and Core Audio.

Updated Jun 17, 2026
One-click install
npx skills add https://github.com/Yar177/appleNativeSkills --skill apple-audio-yar177
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apple-audio
Source: https://github.com/Yar177/appleNativeSkills/tree/main/apple-audio
Command: npx skills add https://github.com/Yar177/appleNativeSkills --skill apple-audio-yar177

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building real-time audio on Apple platforms requires navigating AVAudioEngine graphs, audio session configuration, real-time thread safety rules, and AUv3 extension packaging, where mistakes cause silence, dropouts, or crashes. ## Core Features & Use Cases - Engine Graph Construction: Attach, connect, and schedule AVAudioPlayerNode, effects, mixers, and sub-mixers with correct format matching. - Real-Time DSP & Synthesis: Write render-block-safe oscillators, envelopes, and lock-free parameter passing with AVAudioSourceNode and Accelerate/vDSP. - Audio Session & Routing: Configure AVAudioSession categories, modes, interruptions, and route changes before engine start. - Spatial Audio & MIDI: Position sources with AVAudioEnvironmentNode or PHASE, and wire CoreMIDI to AVAudioUnitSampler. - AUv3 Extensions: Ship effects and instruments as App Extensions with AUParameterTree and internalRenderBlock, validated with auval. - Use Case: Build a synthesizer app where a SwiftUI control updates filter cutoff lock-free while an AVAudioSourceNode renders audio on the real-time thread without dropouts. ## Quick Start Use the apple-audio skill to build an AVAudioEngine graph that plays a looped buffer through a reverb effect with the audio session configured for low-latency playback.

Frequently Asked Questions about apple-audio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an AVAudioEngine graph with effects in Swift?

Attach each node with engine.attach, connect them with matching AVAudioFormat, then call prepare and start. Chain nodes like AVAudioPlayerNode through AVAudioUnitReverb or AVAudioUnitEQ into engine.mainMixerNode, and schedule buffers or files on the player.

How do I generate audio in real time with AVAudioSourceNode?

Provide a render block to AVAudioSourceNode that fills the audio buffer list per frame, such as a sine oscillator advancing phase. The block runs on a real-time thread, so pre-allocate all state and never allocate, lock, or log inside it.

AVAudioEngine vs AVAudioPlayer: which should I use?

Use AVAudioEngine for anything real-time, mixed, or processed, such as effects chains, synthesis, or spatial audio. Use AVAudioPlayer or AVAudioRecorder for simple file playback or recording, which the apple-media skill covers.

Why is my AVAudioEngine output silent or distorted?

The most common cause is a format mismatch on a connect call, so pass an explicit AVAudioFormat matching both nodes. Also verify the node was attached before connecting, the engine was started inside do/catch, and AVAudioSession was configured first on iOS.

Why does my audio glitch or drop out in the render block?

Render blocks run on a real-time thread, and any allocation, blocking lock, I/O, or logging causes dropouts. Pre-allocate buffers, pass parameters with atomics or a lock-free ring buffer, and use Accelerate vDSP for vector math.

How do I ship an audio effect as an AUv3 plug-in?

Add an Audio Unit Extension target hosting an AUAudioUnit subclass, declare the component type like aufx in Info.plist, expose parameters via AUParameterTree, and implement internalRenderBlock for the DSP. Validate with auval and test in hosts like GarageBand or Logic.