Struct redact_composer_midi::gm::Instruments
source · pub struct Instruments {
pub instruments: Vec<Instrument>,
}Expand description
A thin wrapper around a Vec<Instrument> with Add/Subtract operations.
Fields§
§instruments: Vec<Instrument>A list of instruments.
Implementations§
source§impl Instruments
impl Instruments
sourcepub fn all() -> Instruments
pub fn all() -> Instruments
All instruments.
sourcepub fn piano() -> Instruments
pub fn piano() -> Instruments
GM1 piano instruments.
sourcepub fn tonal_percussive() -> Instruments
pub fn tonal_percussive() -> Instruments
GM1 tonal percussive instruments.
sourcepub fn organ() -> Instruments
pub fn organ() -> Instruments
GM1 organ instruments.
sourcepub fn guitar() -> Instruments
pub fn guitar() -> Instruments
GM1 guitar instruments.
sourcepub fn bass() -> Instruments
pub fn bass() -> Instruments
GM1 bass instruments.
sourcepub fn strings() -> Instruments
pub fn strings() -> Instruments
GM1 string instruments.
sourcepub fn ensemble() -> Instruments
pub fn ensemble() -> Instruments
GM1 ensemble instruments.
sourcepub fn brass() -> Instruments
pub fn brass() -> Instruments
GM1 brass instruments.
sourcepub fn reed() -> Instruments
pub fn reed() -> Instruments
GM1 reed instruments.
sourcepub fn pipe() -> Instruments
pub fn pipe() -> Instruments
GM1 pipe instruments.
sourcepub fn synth_lead() -> Instruments
pub fn synth_lead() -> Instruments
GM1 synth lead instruments.
sourcepub fn synth_pad() -> Instruments
pub fn synth_pad() -> Instruments
GM1 synth pad instruments.
sourcepub fn synth_fx() -> Instruments
pub fn synth_fx() -> Instruments
GM1 synth FX instruments.
sourcepub fn ethnic() -> Instruments
pub fn ethnic() -> Instruments
GM1 ethnic instruments.
sourcepub fn percussive() -> Instruments
pub fn percussive() -> Instruments
GM1 percussive instruments.
sourcepub fn sound_fx() -> Instruments
pub fn sound_fx() -> Instruments
GM1 sound FX instruments.
sourcepub fn melodic() -> Instruments
pub fn melodic() -> Instruments
Returns “melodic” instruments which have a clear tone, and are not overly percussive.
Trait Implementations§
source§impl Add<Instrument> for Instruments
impl Add<Instrument> for Instruments
##Example
let pianos = Instruments { instruments: vec![Instrument::AcousticGrandPiano] }
+ Instrument::BrightAcousticPiano;
assert_eq!(pianos, Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] });§type Output = Instruments
type Output = Instruments
The resulting type after applying the
+ operator.source§impl Add<Instruments> for Instrument
impl Add<Instruments> for Instrument
##Example
let pianos = Instrument::AcousticGrandPiano
+ Instruments { instruments: vec![Instrument::BrightAcousticPiano] };
assert_eq!(pianos, Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] });§type Output = Instruments
type Output = Instruments
The resulting type after applying the
+ operator.source§impl Add for Instruments
impl Add for Instruments
##Example
let pianos = Instruments { instruments: vec![Instrument::AcousticGrandPiano] }
+ Instruments { instruments: vec![Instrument::BrightAcousticPiano] };
assert_eq!(pianos, Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] });source§impl Clone for Instruments
impl Clone for Instruments
source§fn clone(&self) -> Instruments
fn clone(&self) -> Instruments
Returns a copy of the value. Read more
1.0.0 · 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 Instruments
impl Debug for Instruments
source§impl From<Instruments> for Vec<Instrument>
impl From<Instruments> for Vec<Instrument>
##Example
let instruments = Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] };
let vec_instruments: Vec<Instrument> = instruments.into();
assert_eq!(
vec_instruments,
vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano]
);source§fn from(value: Instruments) -> Self
fn from(value: Instruments) -> Self
Converts to this type from the input type.
source§impl IntoIterator for Instruments
impl IntoIterator for Instruments
§type Item = Instrument
type Item = Instrument
The type of the elements being iterated over.
§type IntoIter = IntoIter<<Instruments as IntoIterator>::Item>
type IntoIter = IntoIter<<Instruments as IntoIterator>::Item>
Which kind of iterator are we turning this into?
source§impl PartialEq for Instruments
impl PartialEq for Instruments
source§fn eq(&self, other: &Instruments) -> bool
fn eq(&self, other: &Instruments) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Sub<Instrument> for Instruments
impl Sub<Instrument> for Instruments
##Example
let no_violins = Instruments { instruments: vec![Instrument::Violin, Instrument::Cello] }
- Instrument::Violin;
assert_eq!(no_violins, Instruments { instruments: vec![Instrument::Cello] });
let instruments = Instruments { instruments: vec![Instrument::AcousticGrandPiano, Instrument::BrightAcousticPiano] };§type Output = Instruments
type Output = Instruments
The resulting type after applying the
- operator.source§impl Sub for Instruments
impl Sub for Instruments
##Example
let no_violins = Instruments { instruments: vec![Instrument::Violin, Instrument::Cello] }
- Instruments { instruments: vec![Instrument::Violin] };
assert_eq!(no_violins, Instruments { instruments: vec![Instrument::Cello] });impl StructuralPartialEq for Instruments
Auto Trait Implementations§
impl RefUnwindSafe for Instruments
impl Send for Instruments
impl Sync for Instruments
impl Unpin for Instruments
impl UnwindSafe for Instruments
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