unnieversal/crates/utils/src/lib.rs

16 lines
336 B
Rust
Raw Normal View History

2021-07-24 16:40:59 +00:00
pub mod buffers;
pub mod delay;
2021-07-24 16:40:59 +00:00
pub mod logs;
pub mod pitch;
pub mod threeband;
pub fn hermite(frac: f32, xm1: f32, x0: f32, x1: f32, x2: f32) -> f32 {
let c = (x1 - xm1) * 0.5;
let v = x0 - x1;
let w = c + v;
let a = w + v + (x2 - x0) * 0.5;
let b_neg = w + a;
(((a * frac) - b_neg) * frac + c) * frac + x0
}