class
   PF::Envelope
 
  - PF::Envelope
 - Reference
 - Object
 
Overview
Enevelope represents an ADSR cycle to control the amplitude of a sound throughout its lifecycle
Defined in:
audio/envelope.crConstructors
- .new(attack : PF::Envelope::Stage, decay : PF::Envelope::Stage, sustain : PF::Envelope::Stage, release : PF::Envelope::Stage)
 - .new
 
Instance Method Summary
- 
        #amplitude(time : Float64, started_at : Float64, released_at : Float64 | Nil = nil)
        
          
Givin an absolute time, along with when the envelope was started_at, and released_at? returns the current aplitude of the enveloped sound
 - #attack : Stage
 - #attack=(attack : Stage)
 - #decay : Stage
 - #decay=(decay : Stage)
 - 
        #duration
        
          
The length of time this envelope should last for note: might be inifinite if sustain has an infinite duration
 - #release : Stage
 - #release=(release : Stage)
 - 
        #stage(relative_time : Float64)
        
          
Given a relative_time to when the current stage of the envelope was started, returns the current stage (ADSR), along with the relative_time into that stage
 - #sustain : Stage
 - #sustain=(sustain : Stage)
 
Constructor Detail
Instance Method Detail
Givin an absolute time, along with when the envelope was started_at, and released_at? returns the current aplitude of the enveloped sound
The length of time this envelope should last for note: might be inifinite if sustain has an infinite duration
Given a relative_time to when the current stage of the envelope was started, returns the current stage (ADSR), along with the relative_time into that stage