# ashgotcryptidcravings/audifuzz architecture

> Architecture diagram of the GitHub repository ashgotcryptidcravings/audifuzz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashgotcryptidcravings/audifuzz
- Repository: https://github.com/ashgotcryptidcravings/audifuzz

## Overview

Audifuzz is a SwiftUI audio creation and editing app: users can load and process audio in the Editor, or build a synthesized sound in Sound Lab, save it, and send it to the Editor. The app also exposes MIDI control, spatial positioning, a sound library, and audio preferences. The tree and excerpts support the Sound Lab renderer, MIDI message handling, and effect management; wiring among several unsampled views and engine routes is left out.

Main entry points: [`Audifuzz/Views/ContentView.swift`](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/ContentView.swift) (App navigation), [`Audifuzz/Engines/SoundLabEngine.swift`](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/SoundLabEngine.swift) (Sound Lab engine), [`Audifuzz/Views/SoundLabView.swift`](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/SoundLabView.swift) (Sound Lab UI), [`Audifuzz/Views/EditorView.swift`](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/EditorView.swift) (Audio editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["App interface"]
  node_content["App navigation<br/>[ContentView.swift]"]
  node_editor["Audio editor<br/>[EditorView.swift]"]
  node_labview["Sound Lab UI<br/>[SoundLabView.swift]"]
  node_libraryview["Sound library UI"]
  node_preferences["Preferences UI"]
end

subgraph group_audio["Audio editing"]
  node_engine["Audio engine"]
  node_effects["Effect modules<br/>[EffectModule.swift]"]
  node_spatial["Spatial stage<br/>[SpatialStage.swift]"]
end

subgraph group_synth["Sound Lab"]
  node_labengine["Sound Lab engine"]
  node_renderer["Synth renderer"]
  node_models["Voice models<br/>[SynthModels.swift]"]
end

subgraph group_support["Controls and library"]
  node_midi["MIDI input"]
  node_builtin["Built-in sounds"]
end

node_user(("User"))
node_files[("Audio files")]
node_midiinput(("MIDI device"))

node_user -->|"opens app"| node_content
node_content -->|"shows"| node_editor
node_content -->|"shows"| node_labview
node_content -->|"shows"| node_libraryview
node_content -->|"shows"| node_preferences
node_editor -->|"controls playback"| node_engine
node_engine -->|"manages effects"| node_effects
node_labview -->|"edits voices"| node_labengine
node_labengine -->|"renders audio"| node_renderer
node_labengine -->|"uses voice data"| node_models
node_labengine -->|"saves and lists samples"| node_files
node_labview -->|"sends chosen sample"| node_editor
node_libraryview -->|"presents sounds"| node_builtin
node_builtin -->|"installs sounds"| node_files
node_preferences -->|"configures input"| node_midi
node_midiinput -->|"sends MIDI"| node_midi

click node_content "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/ContentView.swift"
click node_editor "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/EditorView.swift"
click node_labview "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/SoundLabView.swift"
click node_libraryview "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/SoundLibraryView.swift"
click node_preferences "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/PreferencesView.swift"
click node_engine "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/AudioEngineManager.swift"
click node_effects "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Effects/EffectModule.swift"
click node_spatial "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Effects/SpatialStage.swift"
click node_labengine "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/SoundLabEngine.swift"
click node_renderer "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Instruments/SynthRenderer.swift"
click node_models "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Instruments/SynthModels.swift"
click node_midi "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/MIDIInputManager.swift"
click node_builtin "https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/BuiltInSoundLibrary.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_content,node_editor,node_labview,node_libraryview,node_preferences,node_user toneBlue
class node_engine,node_effects,node_spatial,node_files toneAmber
class node_labengine,node_renderer,node_models toneMint
class node_midi,node_builtin toneRose
class node_midiinput toneIndigo
```

## Components

### App interface

- [App navigation](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/ContentView.swift): `Audifuzz/Views/ContentView.swift`
- [Audio editor](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/EditorView.swift): `Audifuzz/Views/EditorView.swift`
- [Sound Lab UI](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/SoundLabView.swift): `Audifuzz/Views/SoundLabView.swift`
- [Sound library UI](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/SoundLibraryView.swift): `Audifuzz/Views/SoundLibraryView.swift`
- [Preferences UI](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Views/PreferencesView.swift): `Audifuzz/Views/PreferencesView.swift`

### Audio editing

- [Audio engine](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/AudioEngineManager.swift): `Audifuzz/Engines/AudioEngineManager.swift`
- [Effect modules](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Effects/EffectModule.swift): `Audifuzz/Effects/EffectModule.swift`
- [Spatial stage](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Effects/SpatialStage.swift): `Audifuzz/Effects/SpatialStage.swift`

### Sound Lab

- [Sound Lab engine](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/SoundLabEngine.swift): `Audifuzz/Engines/SoundLabEngine.swift`
- [Synth renderer](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Instruments/SynthRenderer.swift): `Audifuzz/Instruments/SynthRenderer.swift`
- [Voice models](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Instruments/SynthModels.swift): `Audifuzz/Instruments/SynthModels.swift`

### Controls and library

- [MIDI input](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/MIDIInputManager.swift): `Audifuzz/Engines/MIDIInputManager.swift`
- [Built-in sounds](https://github.com/ashgotcryptidcravings/audifuzz/blob/main/Audifuzz/Engines/BuiltInSoundLibrary.swift): `Audifuzz/Engines/BuiltInSoundLibrary.swift`

### Other components

- **User**
- **Audio files**
- **MIDI device**

## Connections

- User → App navigation: opens app
- App navigation → Audio editor: shows
- App navigation → Sound Lab UI: shows
- App navigation → Sound library UI: shows
- App navigation → Preferences UI: shows
- Audio editor → Audio engine: controls playback
- Audio engine → Effect modules: manages effects
- Sound Lab UI → Sound Lab engine: edits voices
- Sound Lab engine → Synth renderer: renders audio
- Sound Lab engine → Voice models: uses voice data
- Sound Lab engine → Audio files: saves and lists samples
- Sound Lab UI → Audio editor: sends chosen sample
- Sound library UI → Built-in sounds: presents sounds
- Built-in sounds → Audio files: installs sounds
- Preferences UI → MIDI input: configures input
- MIDI device → MIDI input: sends MIDI
