Skip to main content

max / audiofiles

1.3 KB · 31 lines History Blame Raw
1 //! Sample Forge: the "maker" middle of audiofiles.
2 //!
3 //! AF already owns the two hard halves of a DAWless rig — the content-addressed
4 //! store and the 14-sampler hardware export. The forge is the missing middle:
5 //! take a managed sample and *make* hardware-ready material from it.
6 //!
7 //! - [`chop`] — slice a sample into one-shots by transient, equal divisions, or a
8 //! BPM grid.
9 //! - [`conform`] — resample / convert bit depth + channels to match a device's
10 //! accepted format (M8, Digitakt, SP-404, ...).
11 //! - [`batch`] — silence detection for batch trim-silence (batch normalize reuses
12 //! the existing edit operations).
13 //!
14 //! The DSP here is pure and operates on interleaved `Vec<f32>`, mirroring the
15 //! [`crate::edit`] convention. Snapshots are free: the content-addressed store
16 //! never deletes originals, so every forge action produces new samples without
17 //! risking the source.
18
19 pub mod batch;
20 pub mod chop;
21 pub mod conform;
22 pub mod runner;
23
24 pub use batch::{find_content_bounds, trim_silence};
25 pub use chop::{compute_slices, detect_bpm, render_slice, ChopMethod, Slice};
26 pub use conform::{
27 conform, peak_amplitude, resolve_overshoot, ConformTarget, ConformedAudio, OvershootAction,
28 OvershootReport,
29 };
30 pub use runner::{chop_to_vfs, conform_to_vfs, ChopResult, ConformResult};
31