Function synfx_dsp::note_to_freq
source · [−]Expand description
Converts a midi note (0 to 128) to a frequency
use synfx_dsp::*;
assert_eq!(note_to_freq(69.0) as i32, 440);
assert_eq!(note_to_freq(69.0 + 12.0) as i32, 880);
assert_eq!(note_to_freq(69.0 - 12.0) as i32, 220);