# 1. Install Xcode.app from the Mac App Store, then select it:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
# 2. Install Homebrew packages:
brew install xcodegen
# 3. Create the Python venv + install magenta-rt[mlx] and cmake<3.28:
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install "magenta-rt[mlx]" "cmake<3.28"
# 4. Download model assets to ~/.cache/magenta-rt-v2:
mkdir -p ~/.cache/magenta-rt-v2
export MAGENTA_HOME=~/.cache
mrt models init --download-path ~/.cache/magenta-rt-v2
mrt models download mrt2_small --download-path ~/.cache/magenta-rt-v2The ~/Documents/Magenta/ default path is TCC-protected on a fresh macOS
terminal; ~/.cache avoids the permission prompt. The app's dev paths
point at ~/.cache/magenta-rt-v2 (see AevumApp.swift).
# Full end-to-end build (engine static lib + Xcode app):
./build.sh
# Or step-by-step:
./build.sh engine # CMake build of magentart::core + deps, merged into build/engine/libaevum_engine.a
./build.sh app # XcodeGen generate + xcodebuild
./build.sh run # build + launch the app
./build.sh release # build Release + package a distributable DMG at build/release/Aevum-<ver>.dmg
# Clean everything:
./build.sh cleanThe first ./build.sh engine run takes 10–20 minutes (MLX + TFLite +
SentencePiece from source). Subsequent runs are incremental.
Swift: there is no standalone typecheck target — xcodebuild build is the
canonical check. To just typecheck without linking:
xcodebuild -project Aevum.xcodeproj -scheme Aevum -configuration Debug \
-destination 'platform=macOS' build CODE_SIGNING_ALLOWED=NOThere is no lint config yet (no SwiftLint). Add one if/when needed.
No test target exists yet. When adding tests, create a AevumTests
target in project.yml and run:
xcodebuild test -project Aevum.xcodeproj -scheme Aevum -destination 'platform=macOS'Sources/Engine/EngineBridge.h+.mmis the Obj-C++ facade overmagentart::core::RealtimeRunner. Pure Obj-C in the public API so Swift can import it via the bridging header.Sources/Engine/AudioEngine.swiftpulls stereo Float32 from the bridge viaAVAudioSourceNodeon the audio thread.Sources/Engine/MIDIManager.swiftroutes CoreMIDI notes + CC to bridge setters, with a CC→param map (MIDI-learnable).Sources/Engine/EngineController.swiftis the@MainActororchestrator ObservableObject that SwiftUI views observe.Sources/Import/is the offline pipeline: decode → beat-track → slice → MusicCoCa-embed → store.BeatTrackeris native vDSP; embedding extraction talks to the bridge.Sources/Similarity/computes cosine similarity over 768-dim MusicCoCa embeddings and suggests setlists (smooth/contrast/cluster).Sources/Storage/LibraryStore.swiftis SQLite (system libsqlite3, no external dep). Embeddings are Float32 BLOBs.
kMaxPrompts = 6(6 blend slots)kMusicCoCaEmbeddingDim = 768kMaxPCAComponents = 6,kMaxCentroids = 6kFrameSamples = 1920@ 48 kHz / 25 Hz stereokNumRVQLevels = 12
The C++ engine build fails with xcrun: error: unable to find utility "metal" because only Command Line Tools are installed. The Metal compiler
ships with Xcode.app only. Once Xcode is installed and selected via
xcode-select, ./build.sh engine will work. The Python pipeline
(mrt mlx generate) already works — it uses prebuilt MLX wheels.