pub fn gain(x: f32, coarse: bool) -> f32