CLAUDE.md
CLAUDE.mdCLAUDE.mdroot
Quality
84/100
Scores the file, not the repository.Length
439 words
11 headings · 1 code blocksRepository
11k
— · pushed 9 days agoLast changed
2 days ago
First indexed 2 days ago.1# CLAUDE.md23This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.45## Build & Test Commands67AudioKit uses Swift Package Manager. The CI builds target iOS Simulator:89```bash10# Build11xcodebuild -scheme AudioKit -destination "platform=iOS Simulator,name=iPhone 17 Pro"1213# Run all tests14xcodebuild -scheme AudioKit -destination "platform=iOS Simulator,name=iPhone 17 Pro" test1516# Run a single test17xcodebuild -scheme AudioKit -destination "platform=iOS Simulator,name=iPhone 17 Pro" test -only-testing:AudioKitTests/DistortionTests/testDefault18```1920You can also open the package in Xcode (drag the folder onto Xcode's dock icon) and run tests with Cmd-U.2122## Architecture2324**AudioKit** is a Swift-only audio framework wrapping AVFoundation. It targets macOS 11+, iOS 13+, tvOS 13+, and visionOS 1+. It has zero external dependencies.2526### Core Abstractions2728- **Node** (`Internals/Engine/Node.swift`) — Protocol wrapping `AVAudioNode`. All audio graph elements (effects, generators, players, mixers) conform to Node. Nodes connect to each other to form the signal chain.29- **AudioEngine** (`Internals/Engine/AudioEngine.swift`) — Wraps `AVAudioEngine`. Set `engine.output` to a Node to drive connections. Provides `startTest()`/`render()` methods for headless test rendering.30- **@Parameter** — Property wrapper for audio parameters on nodes.31- **Settings** (`Internals/Settings/`) — Platform-specific audio session and format configuration.3233### Source Layout (Sources/AudioKit/)3435- `Nodes/` — Audio graph nodes organized by category:36 - `Effects/` (Distortion, Dynamics, Filters)37 - `Generators/` (PlaygroundOscillator, PlaygroundNoiseGenerator)38 - `Mixing/` (Mixer, MatrixMixer, Mixer3D, EnvironmentalNode)39 - `Playback/` (AudioPlayer, MultiSegmentAudioPlayer, AppleSampler, VariSpeed, TimePitch)40- `MIDI/` — CoreMIDI wrapper with listener/transformer pattern, file parsing, virtual ports41- `Taps/` — Non-intrusive audio stream analysis (AmplitudeTap, FFTTap, RawDataTap, NodeRecorder)42- `Internals/` — Engine, hardware devices, settings, tables, utilities, error handling43- `Audio Files/` — FormatConverter, AVAudioFile/AVAudioPCMBuffer extensions44- `Sequencing/` — AppleSequencer (CoreAudio/MIDI-based)4546### Extension Ecosystem4748This repo is the **base layer only** (Swift wrapping AVFoundation). C++/DSP functionality lives in separate packages: AudioKitEX/CAudioKitEX provide the DSP layer, and packages like SoundpipeAudioKit, DunneAudioKit, STKAudioKit extend it with additional nodes.4950## Testing Approach5152Tests use **MD5 hash comparison** of rendered audio buffers for deterministic validation. The workflow:53541. Create an `AudioEngine`, attach nodes, call `engine.startTest(totalDuration:)`552. Render audio with `engine.render(duration:)`563. Validate with `testMD5(audio)` which checks against hashes in `ValidatedMD5s.swift`5758During test development, use `audio.audition()` to listen to output, then capture the MD5 hash and add it to the validated dictionary. Remove `audition()` before committing.5960## Style Conventions6162- camelCase variables (lowercase first), uppercase Classes. No Hungarian notation.63- Descriptors before nouns: `leftOutput` not `outputLeft`64- Omit units from names: `frequency` not `frequencyInHz`65- Only collections are pluralized: `channelCount` not `numberOfChannels`66- Acronyms all CAPS or all lowercase: `enableMIDI` not `enableMidi`67- Booleans: `is` prefix with `ed`/`ing` suffix: `isLooping`, `isFilterEnabled`68- Time intervals are called "Durations" (to distinguish from moments in time)69
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| livewire/livewireCLAUDE.md · 24k | CLAUDE.md | setupbuildteststyle+4 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| stacklok/toolhiveCLAUDE.md · 2.0k | CLAUDE.md | buildteststylearch+4 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago |
