How audiokit/audiokitsynthone works
Project Type and Purpose
• AudioKit Synth One is a full-featured iOS audio synthesizer app.
• It is built as an Xcode workspace combining Swift-based UI code, Objective-C/C++ DSP kernels, CocoaPods for the AudioKit framework, an optional Ableton Link SDK, and a OneSignal notification extension.
File Structure Analysis
• Top-level:
• AudioKitSynthOne.xcworkspace & .xcodeproj – Xcode workspace integrating source and pods
• Podfile / Podfile.lock – CocoaPods dependencies (AudioKit, OneSignal, etc.)
• OneSignalNotificationServiceExtension/ – separate target for push notifications
• Source root “AudioKitSynthOne/”: subdivided into logical feature folders:
• UI panels: About, Effects, Envelopes, Generators, Header, Keyboard, Presets, Sequencer, TouchPad, Tunings
• Shared UI controls: Controls/Buttons, Knobs, Stepper
• Global managers & navigation: Manager/, Navigation/
• DSP engine: DSP/ (Conductor.swift, audio unit bridge, DSP Kernel C++ files, note state, sequencer, TAAE threading)
• Link integration: Link/ (Ableton Link wrapper files)
• MIDI handling: MIDI/
• Presets data: Presets/Data/*.json
• Settings & app-wide utilities: Settings/, Helpers.swift
• Translations & assets: Assets/, Translations/, .lproj folders
• Build configurations: swiftlint, Travis CI, crowdin config, Podspecs.
README Insights
• Uses AudioKit for low-level DSP; pods must be installed first.
• Ableton Link support is optional, enabled via build flag and SDK folder.
• OneSignal extension is a separate binary target.
• Code is modularized by feature with folder-level READMEs, consistent MVC/delegation patterns.
Main Components
A. Front-end UI Layer (Swift UIViewControllers & custom controls)
• Feature Panels (GeneratorsPanelController, EffectsPanelController, etc.)
• Shared Controls (Buttons, Knobs, Steppers)
• Navigation & Manager classes orchestrate view embedding and delegation
B. Application Controller Layer
• Manager.swift orchestrates parameter change propagation, view updates, push notifications
• MIDI Manager & Link Manager handle real-time MIDI events and Ableton Link synchronization
C. Audio Engine Layer
• Conductor.swift – central coordinator calling into DSP Kernel
• Audio Unit Bridge (S1AudioUnit.h/.mm) exports AUv3 plugin interface
• DSP Kernel (S1DSPKernel.cpp/.mm) implements audio processing graph
• Bandlimited Wavetables, NoteState, Sequencer components supply data to kernel
• TAAE submodule handles thread-safe audio data passing
D. Data Persistence & Assets
• PresetDataManager loading/saving JSON preset banks
• TuningBank & default tunings JSON
• Assets.xcassets for UI images
E. External Services
• CocoaPods dependencies: AudioKit framework, OneSignal SDK
• Optional Ableton Link SDK wrapped under Link/
• OneSignalNotificationServiceExtension running separately under notifications target
Relationships & Data Flows
• UI Panel → Manager (delegation) → Conductor → DSP Kernel → Audio Hardware
• Manager / Link Manager listens to Ableton Link timeline → updates Conductor tempo
• MIDI inputs → MIDI Manager → Conductor → DSP Kernel
• Preset editor UI → PresetDataManager → JSON store
• Push notifications handled in extension → delivered to main app via system APIs
Architectural Patterns & Design Principles
• Layered MVC-style separation: UI Views/Controllers, Managers, Engine
• Delegation patterns between Manager and feature views
• Single Conductor singleton coordinating all audio parameter changes
• Thread-safe message queue (TAAE) for real-time audio thread communication
• Feature modules encapsulated in folders with per-module README
Technologies & Frameworks
• Swift (UI, Managers, wrapping code)
• Objective-C / C++ (Audio Unit, DSP kernel)
• AudioKit (pod-provided DSP building blocks)
• Ableton Link SDK (optional tempo sync)
• OneSignal SDK (push notifications)
• CocoaPods, Xcode workspace, Travis CI