pub struct EnvelopeBlock<S>where
S: Sample,{
pub attack: Parameter<S>,
pub decay: Parameter<S>,
pub sustain: Parameter<S>,
pub release: Parameter<S>,
/* private fields */
}Expand description
ADSR envelope generator block for amplitude and parameter modulation.
Fields§
§attack: Parameter<S>Attack time in seconds.
decay: Parameter<S>Decay time in seconds.
sustain: Parameter<S>Sustain level (0.0 - 1.0).
release: Parameter<S>Release time in seconds.
Implementations§
Trait Implementations§
Source§impl<S> Block<S> for EnvelopeBlock<S>where
S: Sample,
impl<S> Block<S> for EnvelopeBlock<S>where
S: Sample,
Source§fn process(
&mut self,
_inputs: &[&[S]],
outputs: &mut [&mut [S]],
modulation_values: &[S],
context: &DspContext,
)
fn process( &mut self, _inputs: &[&[S]], outputs: &mut [&mut [S]], modulation_values: &[S], context: &DspContext, )
Process audio through this block. Read more
Source§fn input_count(&self) -> usize
fn input_count(&self) -> usize
Returns the number of input ports this block accepts.
Source§fn output_count(&self) -> usize
fn output_count(&self) -> usize
Returns the number of output ports this block produces.
Source§fn modulation_outputs(&self) -> &[ModulationOutput]
fn modulation_outputs(&self) -> &[ModulationOutput]
Returns the modulation outputs this block provides. Read more
Source§fn channel_config(&self) -> ChannelConfig
fn channel_config(&self) -> ChannelConfig
Returns how this block handles multi-channel audio. Read more
Auto Trait Implementations§
impl<S> Freeze for EnvelopeBlock<S>where
S: Freeze,
impl<S> RefUnwindSafe for EnvelopeBlock<S>where
S: RefUnwindSafe,
impl<S> Send for EnvelopeBlock<S>
impl<S> Sync for EnvelopeBlock<S>
impl<S> Unpin for EnvelopeBlock<S>where
S: Unpin,
impl<S> UnwindSafe for EnvelopeBlock<S>where
S: UnwindSafe,
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