pub struct Note {
pub freq: f64,
pub dur: f64,
pub vol: f32,
pub wave: WaveForm,
}Expand description
This struct represents a note.
It is the building block for all songs made with rs-audio.
use rs_audio::*;
let note: Note = Note {
freq: 440.0,
dur: 3.0,
vol: 0.20,
wave: WaveForm::Sine,
};
let default_note = Note::default(); // This outputs the same note as the one above.Fields§
§freq: f64§dur: f64§vol: f32§wave: WaveFormTrait Implementations§
Source§impl<'de> Deserialize<'de> for Note
impl<'de> Deserialize<'de> for Note
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Note
impl RefUnwindSafe for Note
impl Send for Note
impl Sync for Note
impl Unpin for Note
impl UnwindSafe for Note
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