pub enum Engine {
One,
Two,
Three,
Four,
}Expand description
One of the four effect engines.
Which one a slot belongs to is what turns “slot 3 of a Room Reverb” into a parameter a host can edit.
Variants§
One
The first engine, whose slots are FX 1 Param 1 through 12.
Two
The second engine.
Three
The third engine.
Four
The fourth engine.
Implementations§
Source§impl Engine
impl Engine
Sourcepub const ALL: [Self; 4]
pub const ALL: [Self; 4]
Every engine, in the order the program stores them.
Declared as ENGINE_COUNT long, which the specification generates, so
a synthesizer with a fifth engine fails to compile here rather than
losing one.
Sourcepub const fn number(self) -> u8
pub const fn number(self) -> u8
Returns the engine’s number as the display writes it, 1 through 4.
Sourcepub const fn from_number(number: u8) -> Result<Self>
pub const fn from_number(number: u8) -> Result<Self>
Returns the engine with this number, 1 through 4.
§Errors
Returns Error::EngineOutOfRange for anything else.
Sourcepub fn algorithm_parameter(self) -> ParamId
pub fn algorithm_parameter(self) -> ParamId
Returns the parameter holding which algorithm this engine is running.
Sourcepub fn gain_parameter(self) -> ParamId
pub fn gain_parameter(self) -> ParamId
Returns the parameter holding this engine’s output gain.
The manual calls it Level where the modulation matrix names it, and
FX n Output Gain in the parameter table. What it does to a slot
depends on where the routing puts that slot, which is spec/routing.toml
and is not published here.
Sourcepub fn slot_parameter(self, slot: u8) -> Option<ParamId>
pub fn slot_parameter(self, slot: u8) -> Option<ParamId>
Returns the parameter addressing one of this engine’s slots, counting from 1.
None past SLOTS_PER_ENGINE. A slot number an algorithm does not
use still has a parameter: the engine holds twelve bytes whatever it is
running.
Sourcepub fn slot_parameters(self) -> &'static [ParamId; 12]
pub fn slot_parameters(self) -> &'static [ParamId; 12]
Returns every slot parameter this engine addresses, in slot order.
Sourcepub fn of(parameter: ParamId) -> Option<Self>
pub fn of(parameter: ParamId) -> Option<Self>
Returns the engine whose slots include this parameter, if one does.
The way back from a parameter a host is drawing to the engine whose algorithm says what it is. Only the twelve slots of an engine answer; its type and gain parameters are the engine’s own settings rather than slots.
Trait Implementations§
impl Copy for Engine
Source§impl<'de> Deserialize<'de> for Engine
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Engine
serde only.