wip: oscillators

This commit is contained in:
HiveBeats
2022-10-31 10:43:53 +04:00
parent df6a6da423
commit 6da2dcfa6a
3 changed files with 37 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
module SoundGen.Synth
open Settings
open Oscillator
let getHzBySemitones semi =
pitchStandard * (2. ** (1. / 12.)) ** semi
@@ -52,8 +53,7 @@ let freq hz duration =
Seq.map
(fun x ->
x
|> (*) (2. * System.Math.PI * hz / sampleRate)
|> sin
|> sinesquareosc hz
|> (*) volume
)
samples