#[non_exhaustive]pub enum ModSource {
Show 25 variants
Off,
PitchBend,
ModWheel,
FootCtrl,
BreathCtrl,
Pressure,
Expression,
Lfo1,
Lfo2,
Env1,
Env2,
Env3,
NoteNum,
NoteVel,
NoteOffVel,
CtrlSeq,
Lfo1Uni,
Lfo2Uni,
Lfo1Fade,
Lfo2Fade,
VoiceNum,
UniVoice,
CcX,
CcY,
CcZ,
}Expand description
Modulation Matrix Source.
Firmware renumbered this table rather than extending it, so a variant is what
the value means and not the byte it travels as. ModSource::raw_for is that
byte on a given firmware, and ModSource::raw is it on the newest.
Every value the synthesizer has a name for. A byte outside the table is not
one of these: ModSource::from_raw answers None for it, and the byte stays
in the program either way.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Off
Off.
PitchBend
Pitch Bend.
ModWheel
Mod Wheel.
FootCtrl
Foot Ctrl.
BreathCtrl
BreathCtrl.
Pressure
Pressure.
Expression
Expression.
Lfo1
LFO1.
Lfo2
LFO2.
Env1
Env 1.
Env2
Env 2.
Env3
Env 3.
NoteNum
Note Num.
NoteVel
Note Vel.
NoteOffVel
Note Off Vel.
CtrlSeq
Ctrl Seq.
Lfo1Uni
LFO1 (Uni).
Lfo2Uni
LFO2 (Uni).
Lfo1Fade
LFO1 (Fade).
Lfo2Fade
LFO2 (Fade).
VoiceNum
Voice Num.
UniVoice
Uni Voice.
CcX
CC X (115).
CcY
CC Y (116).
CcZ
CC Z (117).
Implementations§
Source§impl ModSource
impl ModSource
Sourcepub const fn from_raw(raw: u8) -> Option<Self>
pub const fn from_raw(raw: u8) -> Option<Self>
Returns the value this byte selects on DEFAULT_FIRMWARE.
None when the table does not list the byte.
Sourcepub const fn from_raw_for(raw: u8, firmware: Version) -> Option<Self>
pub const fn from_raw_for(raw: u8, firmware: Version) -> Option<Self>
Returns the value this byte selects on the firmware a device inquiry reported.
Worth reaching for whenever the byte came from a stored program: nothing in a dump says which firmware wrote it, and this table was renumbered.
Sourcepub const fn raw(self) -> u8
pub const fn raw(self) -> u8
Returns the byte that selects this value on DEFAULT_FIRMWARE.
Sourcepub const fn raw_for(self, firmware: Version) -> Option<u8>
pub const fn raw_for(self, firmware: Version) -> Option<u8>
Returns the byte that selects this value on the firmware a device inquiry reported.
None for a value that firmware does not have.
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Returns the name the synthesizer’s display writes, as of
DEFAULT_FIRMWARE.
Sourcepub fn name_for(self, firmware: Version) -> Option<&'static str>
pub fn name_for(self, firmware: Version) -> Option<&'static str>
Returns the name the synthesizer’s display writes on the firmware a device inquiry reported.
None for a value that firmware does not have. The names live in the
value table the parameter layer already carries; nothing here holds a
second copy of them.
Trait Implementations§
impl Copy for ModSource
Source§impl<'de> Deserialize<'de> for ModSource
Available on crate feature serde only.
impl<'de> Deserialize<'de> for ModSource
serde only.