Enum midi_msg::GMSoundSet

source ·
#[repr(u8)]
pub enum GMSoundSet {
Show 128 variants AcousticGrandPiano = 0, BrightAcousticPiano = 1, ElectricGrandPiano = 2, HonkytonkPiano = 3, ElectricPiano1 = 4, ElectricPiano2 = 5, Harpsichord = 6, Clavi = 7, Celesta = 8, Glockenspiel = 9, MusicBox = 10, Vibraphone = 11, Marimba = 12, Xylophone = 13, TubularBells = 14, Dulcimer = 15, DrawbarOrgan = 16, PercussiveOrgan = 17, RockOrgan = 18, ChurchOrgan = 19, ReedOrgan = 20, Accordion = 21, Harmonica = 22, TangoAccordion = 23, AcousticGuitarNylon = 24, AcousticGuitarSteel = 25, ElectricGuitarJazz = 26, ElectricGuitarClean = 27, ElectricGuitarMuted = 28, OverdrivenGuitar = 29, DistortionGuitar = 30, GuitarHarmonics = 31, AcousticBass = 32, ElectricBassFinger = 33, ElectricBassPick = 34, FretlessBass = 35, SlapBass1 = 36, SlapBass2 = 37, SynthBass1 = 38, SynthBass2 = 39, Violin = 40, Viola = 41, Cello = 42, Contrabass = 43, TremoloStrings = 44, PizzicatoStrings = 45, OrchestralHarp = 46, Timpani = 47, StringEnsemble1 = 48, StringEnsemble2 = 49, SynthStrings1 = 50, SynthStrings2 = 51, ChoirAahs = 52, VoiceOohs = 53, SynthVoice = 54, OrchestraHit = 55, Trumpet = 56, Trombone = 57, Tuba = 58, MutedTrumpet = 59, FrenchHorn = 60, BrassSection = 61, SynthBrass1 = 62, SynthBrass2 = 63, SopranoSax = 64, AltoSax = 65, TenorSax = 66, BaritoneSax = 67, Oboe = 68, EnglishHorn = 69, Bassoon = 70, Clarinet = 71, Piccolo = 72, Flute = 73, Recorder = 74, PanFlute = 75, BlownBottle = 76, Shakuhachi = 77, Whistle = 78, Ocarina = 79, Lead1 = 80, Lead2 = 81, Lead3 = 82, Lead4 = 83, Lead5 = 84, Lead6 = 85, Lead7 = 86, Lead8 = 87, Pad1 = 88, Pad2 = 89, Pad3 = 90, Pad4 = 91, Pad5 = 92, Pad6 = 93, Pad7 = 94, Pad8 = 95, FX1 = 96, FX2 = 97, FX3 = 98, FX4 = 99, FX5 = 100, FX6 = 101, FX7 = 102, FX8 = 103, Sitar = 104, Banjo = 105, Shamisen = 106, Koto = 107, Kalimba = 108, Bagpipe = 109, Fiddle = 110, Shanai = 111, TinkleBell = 112, Agogo = 113, SteelDrums = 114, Woodblock = 115, TaikoDrum = 116, MelodicTom = 117, SynthDrum = 118, ReverseCymbal = 119, GuitarFretNoise = 120, BreathNoise = 121, Seashore = 122, BirdTweet = 123, TelephoneRing = 124, Helicopter = 125, Applause = 126, Gunshot = 127,
}
Expand description

The instrument that should be played when applying a ChannelVoiceMsg::ProgramChange.

Use GMSoundSet::Sound as u8 to use as the program number. For example:

MidiMsg::ChannelVoice {
    channel: Channel::Ch1,
    msg: ChannelVoiceMsg::ProgramChange {
        program: GMSoundSet::Vibraphone as u8
    }
};

Should not be used when targeting channel 10.

As defined in General MIDI System Level 1 (MMA0007 / RP003).

Variants§

§

AcousticGrandPiano = 0

§

BrightAcousticPiano = 1

§

ElectricGrandPiano = 2

§

HonkytonkPiano = 3

§

ElectricPiano1 = 4

§

ElectricPiano2 = 5

§

Harpsichord = 6

§

Clavi = 7

§

Celesta = 8

§

Glockenspiel = 9

§

MusicBox = 10

§

Vibraphone = 11

§

Marimba = 12

§

Xylophone = 13

§

TubularBells = 14

§

Dulcimer = 15

§

DrawbarOrgan = 16

§

PercussiveOrgan = 17

§

RockOrgan = 18

§

ChurchOrgan = 19

§

ReedOrgan = 20

§

Accordion = 21

§

Harmonica = 22

§

TangoAccordion = 23

§

AcousticGuitarNylon = 24

§

AcousticGuitarSteel = 25

§

ElectricGuitarJazz = 26

§

ElectricGuitarClean = 27

§

ElectricGuitarMuted = 28

§

OverdrivenGuitar = 29

§

DistortionGuitar = 30

§

GuitarHarmonics = 31

§

AcousticBass = 32

§

ElectricBassFinger = 33

§

ElectricBassPick = 34

§

FretlessBass = 35

§

SlapBass1 = 36

§

SlapBass2 = 37

§

SynthBass1 = 38

§

SynthBass2 = 39

§

Violin = 40

§

Viola = 41

§

Cello = 42

§

Contrabass = 43

§

TremoloStrings = 44

§

PizzicatoStrings = 45

§

OrchestralHarp = 46

§

Timpani = 47

§

StringEnsemble1 = 48

§

StringEnsemble2 = 49

§

SynthStrings1 = 50

§

SynthStrings2 = 51

§

ChoirAahs = 52

§

VoiceOohs = 53

§

SynthVoice = 54

§

OrchestraHit = 55

§

Trumpet = 56

§

Trombone = 57

§

Tuba = 58

§

MutedTrumpet = 59

§

FrenchHorn = 60

§

BrassSection = 61

§

SynthBrass1 = 62

§

SynthBrass2 = 63

§

SopranoSax = 64

§

AltoSax = 65

§

TenorSax = 66

§

BaritoneSax = 67

§

Oboe = 68

§

EnglishHorn = 69

§

Bassoon = 70

§

Clarinet = 71

§

Piccolo = 72

§

Flute = 73

§

Recorder = 74

§

PanFlute = 75

§

BlownBottle = 76

§

Shakuhachi = 77

§

Whistle = 78

§

Ocarina = 79

§

Lead1 = 80

§

Lead2 = 81

§

Lead3 = 82

§

Lead4 = 83

§

Lead5 = 84

§

Lead6 = 85

§

Lead7 = 86

§

Lead8 = 87

§

Pad1 = 88

§

Pad2 = 89

§

Pad3 = 90

§

Pad4 = 91

§

Pad5 = 92

§

Pad6 = 93

§

Pad7 = 94

§

Pad8 = 95

§

FX1 = 96

§

FX2 = 97

§

FX3 = 98

§

FX4 = 99

§

FX5 = 100

§

FX6 = 101

§

FX7 = 102

§

FX8 = 103

§

Sitar = 104

§

Banjo = 105

§

Shamisen = 106

§

Koto = 107

§

Kalimba = 108

§

Bagpipe = 109

§

Fiddle = 110

§

Shanai = 111

§

TinkleBell = 112

§

Agogo = 113

§

SteelDrums = 114

§

Woodblock = 115

§

TaikoDrum = 116

§

MelodicTom = 117

§

SynthDrum = 118

§

ReverseCymbal = 119

§

GuitarFretNoise = 120

§

BreathNoise = 121

§

Seashore = 122

§

BirdTweet = 123

§

TelephoneRing = 124

§

Helicopter = 125

§

Applause = 126

§

Gunshot = 127

Trait Implementations§

source§

impl Clone for GMSoundSet

source§

fn clone(&self) -> GMSoundSet

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GMSoundSet

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for GMSoundSet

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl FromStr for GMSoundSet

§

type Err = ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<GMSoundSet, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl IntoEnumIterator for GMSoundSet

source§

impl PartialEq for GMSoundSet

source§

fn eq(&self, other: &GMSoundSet) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<&str> for GMSoundSet

§

type Error = ParseError

The type returned in the event of a conversion error.
source§

fn try_from(s: &str) -> Result<GMSoundSet, <Self as TryFrom<&str>>::Error>

Performs the conversion.
source§

impl Copy for GMSoundSet

source§

impl Eq for GMSoundSet

source§

impl StructuralPartialEq for GMSoundSet

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.