SampleKit: A Native macOS Sample Browser with Local ML
In development.
SampleKit (working title TitledLake) is a native macOS sample browser for music producers. Every ML step runs locally on Apple Silicon, and nothing leaves the machine.
Architecture
SampleKit is a Swift Package Manager project split into targets with clear boundaries:
- AudioIO: reading and decoding audio files
- Analysis: feature extraction
- Embedding: turning audio into vectors
- IndexStore: persistence
- Search: similarity queries
Storage and search
- Metadata is stored with GRDB.swift on SQLite.
- Embedding vectors live in memory-mapped binary files.
- Similarity search is a single matrix operation using
cblas_sgemmfrom Accelerate. With normalized vectors, cosine similarity reduces to a dot product, so ranking a whole library is one BLAS call over a mapped buffer, with no per-row loop and no copy into memory. - A CLI benchmark harness, slcli, measures indexing and search performance outside the UI.
Problems solved along the way
- Xcode 26 deployment-target mismatches across the package
- Build settings overridden at the project level versus the target level
- Entitlements configuration for a sandboxed app
Status
The package structure, storage layer, and benchmark harness are in place. The audio input path is the current open item: it needs the device.audio-input entitlement before AudioIO is implemented.