refactor: separate files

This commit is contained in:
HiveBeats
2022-10-31 08:49:49 +04:00
parent 2e1a5b2bf8
commit b56520740e
7 changed files with 188 additions and 120 deletions

19
SoundGen/Fx.fs Normal file
View File

@@ -0,0 +1,19 @@
module SoundGen.Fx
type Effect =
| Saturator
| Reverb
type Reverb = { Wet: float; Room: float }
type Saturator = { Gain: float }
let saturate (param: Saturator, x: float) = tanh (param.Gain * x)
//
// let process(effects:Effect list, sound:float seq) =
// let mutable output = sound
// effects
// |> List.iter((fun eff ->
// match eff with
// |Saturator -> output <- (output |> Seq.map saturate eff)))
//