struct PF::Envelope::Stage
- PF::Envelope::Stage
- Struct
- Value
- Object
Overview
An Envelope::Stage is a slice of time within an enveleope (Either A,D,S, or R)
Defined in:
audio/envelope.crConstructors
- .new(duration : Float64, initial : Float64, level : Float64, shape : Float64, Float64, Float64, Float64 -> Float64)
- .new(duration : Float64, initial : Float64 = 1.0, level : Float64 = 1.0)
- .new(duration : Float64, initial : Float64 = 1.0, level : Float64 = 1.0, &shape : Float64, Float64, Float64, Float64 -> Float64)
Class Method Summary
-
.lerp
Linear interpolation function
-
.wavy_lerp(hertz : Float64 = 50, amount : Float64 = 0.7)
Pulsating linear interpolation
Instance Method Summary
-
#amplitude(time : Float64)
Get the amplitude for this stage for time time should be relative to the start of this stage
-
#duration : Float64
The length of time in seconds that this stage lasts
-
#duration=(duration : Float64)
The length of time in seconds that this stage lasts
-
#initial : Float64
The initial level of the amplitude
-
#initial=(initial : Float64)
The initial level of the amplitude
-
#level : Float64
The finial level of the amplitude
-
#level=(level : Float64)
The finial level of the amplitude
-
#shape : Float64, Float64, Float64, Float64 -> Float64
This function determines the shape of this stage (defaults to linear) params: time, duration, initial, level
-
#shape=(shape : Float64, Float64, Float64, Float64 -> Float64)
This function determines the shape of this stage (defaults to linear) params: time, duration, initial, level
Constructor Detail
Class Method Detail
Pulsating linear interpolation
Instance Method Detail
Get the amplitude for this stage for time time should be relative to the start of this stage
This function determines the shape of this stage (defaults to linear) params: time, duration, initial, level
This function determines the shape of this stage (defaults to linear) params: time, duration, initial, level