class PF::Sound
- PF::Sound
- Reference
- Object
Defined in:
audio/sound.crConstructors
Class Method Summary
-
.saw_wave(sins : Int, lfo_hertz : Float64 = 0.0, lfo_amp : Float64 = 0.0) : Wave
Calculate a sawtooth wave by addition of sine waves the more sins specified, the closer the waveform will match a straight sawtooth wave /|/|/|/|
-
.saw_wave(lfo_hertz : Float64 = 0.0, lfo_amp : Float64 = 0.0) : Wave
Calculate a sawtooth wave /|/|/|/|
-
.sin_wave(lfo_hertz : Float64 = 0.0, lfo_amp : Float64 = 0.0) : Wave
Calculate a sine wave ~~~~~~~~
- .square_wave(lfo_hertz : Float64 = 0.0, lfo_amp : Float64 = 0.0) : Wave
-
.triangle_wave(lfo_hertz : Float64 = 0.0, lfo_amp : Float64 = 0.0) : Wave
Calculate a triangle wave /////
Instance Method Summary
- #envelope : Envelope
- #envelope=(envelope : Envelope)
- #finished?(time : Float64)
- #hertz : Float64
- #hertz=(hertz : Float64)
- #lfo_amp : Float64
- #lfo_amp=(lfo_amp : Float64)
- #lfo_hertz : Float64
- #lfo_hertz=(lfo_hertz : Float64)
- #release!(time : Float64)
- #released_at : Float64 | Nil
- #released_at=(released_at : Float64 | Nil)
- #sample(time : Float64)
- #started_at : Float64
- #started_at=(started_at : Float64)
- #volume : Float64
- #volume=(volume : Float64)
- #wave : Wave
- #wave=(wave : Wave)
Constructor Detail
def self.new(hertz : Float64, envelope : PF::Envelope, started_at : Float64, volume : Float64 = 1.0, wave : Float64, Float64 -> Float64 = Sound.sin_wave)
#
Class Method Detail
Calculate a sawtooth wave by addition of sine waves the more sins specified, the closer the waveform will match a straight sawtooth wave /|/|/|/|
Calculate a sawtooth wave /|/|/|/|
Calculate a sine wave ~~~~~~~~
Calculate a triangle wave /////