Struct surge_modulation::imports::AdsrEnvelope [−][src]
pub struct AdsrEnvelope {Show 14 fields
pub params: AdsrParamArray<ParamRT<AdsrParam>>,
pub output: f32,
pub phase: f32,
pub sustain: f32,
pub scalestage: f32,
pub idlecount: i32,
pub envstate: AdsrState,
pub _v_c1: f32,
pub _v_c1_delayed: f32,
pub _discharge: f32,
pub time_unit: TimeUnitHandle,
pub tables: TablesHandle,
pub srunit: SampleRateHandle,
pub enabled: bool,
}
Fields
params: AdsrParamArray<ParamRT<AdsrParam>>
output: f32
phase: f32
sustain: f32
scalestage: f32
idlecount: i32
envstate: AdsrState
_v_c1: f32
_v_c1_delayed: f32
_discharge: f32
time_unit: TimeUnitHandle
tables: TablesHandle
srunit: SampleRateHandle
enabled: bool
Implementations
| This is the “analog” mode of the | envelope. If you are unclear what it is | doing because of the SSE the algo is | pretty simple; charge up and discharge | a capacitor with a gate. charge until you | hit 1, discharge while the gate is open | floored at the Sustain; then release. | | There is, in src/headless/UnitTests.cpp in | the “Clone the Analog” section, a non-SSE | implementation of this which makes it much | easier to understand.