[][src]Struct sofiza::sfz::instrument::Instrument

pub struct Instrument { /* fields omitted */ }

Represents the SFZ instrument parsed

All units in the sfz format are in real-world values: Frequencies are expressed in Hertz, pitches in cents, amplitudes in percentage and volumes in decibels.

Notes are expressed in MIDI Note Numbers, or in note names according to the International Pitch Notation (IPN) convention. According to this rules, middle C in the keyboard is C4 and the MIDI note number 60.

Implementations

impl Instrument[src]

pub fn from_file(sfz_path: &Path) -> Result<Self, Error>[src]

Creates an Instrument via loading and parsing some SFZ code in a file

pub fn from_sfz(sfz: &str, sfz_path: &Path) -> Result<Self, Error>[src]

Creates an Instrument via parsing some SFZ code in a string

sfz_path would be the root location from where to find the samples and default_path opcode value is appended to it.

Trait Implementations

impl Debug for Instrument[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.