pub struct Conversion {
pub note_num: u8,
pub stairstep: f32,
pub fraction: f32,
}
Expand description
A quantizer conversion is represented here.
Conversions consist of a stairstep portion and fractional portion. The stairstep is the input value converted to a stairstep with as many steps as there are semitones, and the fractional part is the difference between the actual input value and the quantized stairstep.
The stairstep will always be positive, the fraction may be positive or negative. The stairstep plus the fraction will get us back to the original input value.
The integer note number is also included.
Fields§
§note_num: u8
The integer note number of the conversion
stairstep: f32
The conversion as a stairstep pattern, in the same range as the input except quantized to discrete steps
fraction: f32
The fractional remainder of the stairstep, stairstep + fraction
results in the original input value
Implementations§
Source§impl Conversion
impl Conversion
Trait Implementations§
Source§impl Clone for Conversion
impl Clone for Conversion
Source§fn clone(&self) -> Conversion
fn clone(&self) -> Conversion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more