wip: reverb

This commit is contained in:
HiveBeats
2022-10-31 22:09:31 +04:00
parent fdc5c2f112
commit 2129b73fcb
3 changed files with 27 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
module SoundGen.Oscillator
open System
open Settings
@@ -10,6 +11,9 @@ let sineosc hz x =
let squareosc hz x =
let sign v : float = if v > 0.0 then 1. else -1.
x |> sineosc hz |> sign
let triangleosc (hz:float) (x:float) = 1. - Math.Abs((pos hz x) - 0.5) * 4.
let triangleosc (hz: float) (x: float) = 1. - Math.Abs((pos hz x) - 0.5) * 4.
let sawosc hz x = (pos hz x) * 2. - 1.
let sinesquareosc hz x = sawosc (hz / 4.) x + squareosc (hz/2.) x
let sinesquareosc hz x =
sawosc (hz / 4.) x + squareosc (hz / 2.) x