record-player 0.2.0

Shared Bitneedle transport, record physics, and acoustic scratch engine
Documentation
1
2
3
4
5
6
7
8
9
10
pub const DEFAULT_SHARP_CROSSFADER_WIDTH: f32 = 0.08;

pub fn sharp_crossfader_gains(value: f32, width: f32) -> (f32, f32) {
    let x = value.clamp(0.0, 1.0);
    let width = width.clamp(0.0001, 1.0);
    (
        (x / width).clamp(0.0, 1.0),
        ((1.0 - x) / width).clamp(0.0, 1.0),
    )
}