pub struct ChipSample {
pub values: Vec<u8>,
pub bits: u8,
pub sample_rate: u32,
pub root: Pitch,
pub looping: bool,
}Expand description
Unsigned low-rate PCM, 2..=8 bits stored in one byte/value. Sample-and-hold with
optional whole-sample looping. Pitch is relative to root; it follows gate/ADSR.
A non-looping sample stops at its data end even when its note is still held.
Fields§
§values: Vec<u8>§bits: u8§sample_rate: u32100..=32000 Hz.
root: Pitch§looping: boolImplementations§
Trait Implementations§
Source§impl Clone for ChipSample
impl Clone for ChipSample
Source§fn clone(&self) -> ChipSample
fn clone(&self) -> ChipSample
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChipSample
impl Debug for ChipSample
impl Eq for ChipSample
Source§impl Hash for ChipSample
impl Hash for ChipSample
Source§impl PartialEq for ChipSample
impl PartialEq for ChipSample
impl StructuralPartialEq for ChipSample
Auto Trait Implementations§
impl Freeze for ChipSample
impl RefUnwindSafe for ChipSample
impl Send for ChipSample
impl Sync for ChipSample
impl Unpin for ChipSample
impl UnsafeUnpin for ChipSample
impl UnwindSafe for ChipSample
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more