#[non_exhaustive]pub enum PitchModSource {
Lfo1,
Lfo2,
VcaEnv,
VcfEnv,
ModEnv,
Lfo1Unipolar,
Lfo2Unipolar,
}Expand description
Oscillator Pitch Mod Source.
Every value the synthesizer has a name for. A byte outside the table is not
one of these: PitchModSource::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
Lfo1
LFO 1.
Lfo2
LFO 2.
VcaEnv
VCA Env.
VcfEnv
VCF Env.
ModEnv
Mod Env.
Lfo1Unipolar
LFO 1 Unipolar.
Lfo2Unipolar
LFO 2 Unipolar.
Implementations§
Source§impl PitchModSource
impl PitchModSource
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.
Every firmware numbers this table the same way, so the version makes no difference here; it is taken so that every value type reads alike.
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.
Always Some for this table, which every firmware numbers the same way.
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§
Source§impl Clone for PitchModSource
impl Clone for PitchModSource
impl Copy for PitchModSource
Source§impl Debug for PitchModSource
impl Debug for PitchModSource
Source§impl<'de> Deserialize<'de> for PitchModSource
Available on crate feature serde only.
impl<'de> Deserialize<'de> for PitchModSource
serde only.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>,
Source§impl Display for PitchModSource
impl Display for PitchModSource
impl Eq for PitchModSource
Source§impl Hash for PitchModSource
impl Hash for PitchModSource
Source§impl Ord for PitchModSource
impl Ord for PitchModSource
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PitchModSource
impl PartialEq for PitchModSource
Source§impl PartialOrd for PitchModSource
impl PartialOrd for PitchModSource
Source§impl Serialize for PitchModSource
Available on crate feature serde only.
impl Serialize for PitchModSource
serde only.