struct PF::Envelope::Stage

Overview

An Envelope::Stage is a slice of time within an enveleope (Either A,D,S, or R)

Defined in:

audio/envelope.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(duration : Float64, initial : Float64, level : Float64, shape : Float64, Float64, Float64, Float64 -> Float64) #

[View source]
def self.new(duration : Float64, initial : Float64 = 1.0, level : Float64 = 1.0) #

[View source]
def self.new(duration : Float64, initial : Float64 = 1.0, level : Float64 = 1.0, &shape : Float64, Float64, Float64, Float64 -> Float64) #

[View source]

Class Method Detail

def self.lerp #

Linear interpolation function


[View source]
def self.wavy_lerp(hertz : Float64 = 50, amount : Float64 = 0.7) #

Pulsating linear interpolation


[View source]

Instance Method Detail

def amplitude(time : Float64) #

Get the amplitude for this stage for time time should be relative to the start of this stage


[View source]
def duration : Float64 #

The length of time in seconds that this stage lasts


[View source]
def duration=(duration : Float64) #

The length of time in seconds that this stage lasts


[View source]
def initial : Float64 #

The initial level of the amplitude


[View source]
def initial=(initial : Float64) #

The initial level of the amplitude


[View source]
def level : Float64 #

The finial level of the amplitude


[View source]
def level=(level : Float64) #

The finial level of the amplitude


[View source]
def shape : Float64, Float64, Float64, Float64 -> Float64 #

This function determines the shape of this stage (defaults to linear) params: time, duration, initial, level


[View source]
def shape=(shape : Float64, Float64, Float64, Float64 -> Float64) #

This function determines the shape of this stage (defaults to linear) params: time, duration, initial, level


[View source]