feat: note transcription convention
This commit is contained in:
@@ -7,7 +7,7 @@ open SoundGen.Oscillator
|
||||
let private getHzBySemitones semi =
|
||||
pitchStandard * (2. ** (1. / 12.)) ** semi
|
||||
|
||||
let private getSemitoneShift (rootNote : string) (targetNote : string) : int =
|
||||
let getSemitoneShift (rootNote : string) (targetNote : string) : int =
|
||||
// Define arrays to map pitch classes to numeric values and vice versa
|
||||
let pitchClasses = [| "C"; "C#"; "D"; "D#"; "E"; "F"; "F#"; "G"; "G#"; "A"; "A#"; "B" |]
|
||||
let pitchClassValues = [| 0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11 |]
|
||||
@@ -25,6 +25,8 @@ let private getSemitoneShift (rootNote : string) (targetNote : string) : int =
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let private freq hz duration (osc: OscillatorParameter list) =
|
||||
let samples =
|
||||
seq { 0.0 .. (duration * sampleRate) }
|
||||
|
||||
Reference in New Issue
Block a user