pub struct Wave { /* private fields */ }Expand description
Implementations§
Source§impl Wave
impl Wave
Sourcepub const fn note(self, note: Note, octave: u8) -> Self
pub const fn note(self, note: Note, octave: u8) -> Self
Tune to note at octave.
This channel reads its waveform half as fast as a pulse channel, so its range sits an octave below theirs: C1 through B4 within about five cents, nothing lower to reach, and the same drift above.
Sourcepub const fn at_period(self, period: u16) -> Self
pub const fn at_period(self, period: u16) -> Self
Tune to a period value, which counts up rather than down: the larger it
is, the higher the pitch. At most $7FF.
Sourcepub const fn length(self, ticks: u16) -> Self
pub const fn length(self, ticks: u16) -> Self
Stop the channel after ticks of a 256 Hz count, at most 256.
Trait Implementations§
impl Copy for Wave
impl Eq for Wave
impl StructuralPartialEq for Wave
Auto Trait Implementations§
impl BankSafe for Wave
impl Freeze for Wave
impl RefUnwindSafe for Wave
impl Send for Wave
impl Sync for Wave
impl Unpin for Wave
impl UnsafeUnpin for Wave
impl UnwindSafe for Wave
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