Skip to main content

max / audiofiles

2.5 KB · 61 lines History Blame Raw
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 pub mod analysis;
37 pub mod collections;
38 pub mod db;
39 pub mod edit;
40 pub mod error;
41 pub mod export;
42 pub mod fingerprint;
43 pub mod forge;
44 pub mod id_types;
45 pub mod instrument;
46 pub mod rename;
47 pub mod search;
48 pub mod similarity;
49 pub mod store;
50 pub mod tags;
51 pub mod util;
52 pub mod vault;
53 pub mod vfs;
54 pub mod vfs_mirror;
55 pub mod vp_tree;
56
57 pub use id_types::{CollectionId, NodeId, SampleHash, VfsId};
58
59 #[cfg(test)]
60 mod test_helpers;
61