pub fn apply_distortion(s: f32, damt: f32, dist_type: u8) -> f32