max / audiofiles
| 1 | //! Core library for audiofiles: sync-only sample storage, VFS, tags, and analysis. No UI or async. |
| 2 | //! |
| 3 | //! ## Module Overview |
| 4 | //! |
| 5 | //! ### Storage & Organization |
| 6 | //! - [`store`] — Content-addressed blob storage (SHA-256 hash → flat `{hash}.{ext}` directory) |
| 7 | //! - [`vfs`] — Virtual filesystem: directory trees backed by SQLite, nodes link to content hashes |
| 8 | //! - [`vfs_mirror`] — Exports the VFS as a symlink tree on disk (Unix only) for DAW/file manager access |
| 9 | //! - [`vault`] — Vault registry: persistent list of known data directories with active vault selection |
| 10 | //! |
| 11 | //! ### Audio Analysis |
| 12 | //! - [`analysis`] — Pipeline orchestrator: decode → feature extraction → classification → DB persistence |
| 13 | //! - [`fingerprint`] — Near-duplicate detection via peak envelope fingerprinting and correlation |
| 14 | //! - [`similarity`] — Weighted Euclidean distance search with optional VP-tree index |
| 15 | //! - [`vp_tree`] — Generic vantage-point tree for sub-linear nearest-neighbor queries in metric spaces |
| 16 | //! |
| 17 | //! ### Metadata & Search |
| 18 | //! - [`tags`] — Hierarchical dot-notation tag system with validation, CRUD, and prefix queries |
| 19 | //! - [`collections`] — Named sample groups (manual or dynamic/saved-search) |
| 20 | //! - [`search`] — Query builder with text and multi-dimensional audio feature filters |
| 21 | //! |
| 22 | //! ### Editing & Export |
| 23 | //! - [`edit`] — Destructive sample editing (trim, normalize, reverse, gain, fade) on `Vec<f32>` buffers |
| 24 | //! - [`export`] — Export pipeline: collect VFS items, optionally transcode, write to filesystem |
| 25 | //! - [`rename`] — Pattern-based filename generation with context tokens (`{name}`, `{bpm}`, `{key}`) |
| 26 | //! |
| 27 | //! ### Instrument & Types |
| 28 | //! - [`instrument`] — MIDI note mapping, ADSR envelope, key zone configuration for sampler playback |
| 29 | //! - [`id_types`] — Strongly-typed entity ID newtypes ([`VfsId`], [`NodeId`], [`SampleHash`], etc.) |
| 30 | //! |
| 31 | //! ### Infrastructure |
| 32 | //! - [`db`] — SQLite database wrapper with versioned inline migrations (sync-only, no async) |
| 33 | //! - [`error`] — Unified error type ([`error::CoreError`]) and shared utilities |
| 34 | //! - [`util`] — Path/file helpers and audio extension whitelist |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | pub use ; |
| 58 | |
| 59 | |
| 60 | |
| 61 |