Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
Ændrede standard algoritment til robust
Browse files Browse the repository at this point in the history
  • Loading branch information
krestenlaust committed Dec 19, 2021
1 parent 1776add commit b174130
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 45 deletions.
8 changes: 4 additions & 4 deletions Aud.IO.Algorithms/CooleyTukey.fs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ module CooleyTukey =

let Forward (amplitudes : float array) =
let N = amplitudes.Length
//let window k = Math.Sin(Math.PI * (float k + 0.5) / float N) ** 2.0
let window k = 1.0
let window k = Math.Sin(Math.PI * (float k + 0.5) / float N) ** 2.0
//let window k = 1.0

let X = [| for k in 0..(N-1) -> Complex(amplitudes.[k] * window(k), 0.0) |]
forwardComputations X
Expand All @@ -57,8 +57,8 @@ module CooleyTukey =
let N = frequencyBins.Length
let X = backwardComputations (frequencyBins, N)

//let window k = (1.0 - Math.Sin(Math.PI * (float k + 0.5) / float N)) ** 2.0
let window k = 1.0
let window k = (1.0 - Math.Sin(Math.PI * (float k + 0.5) / float N)) ** 2.0
//let window k = 1.0

[| for k in 0..(N-1) -> X.[k].Real * window(k) |]

80 changes: 40 additions & 40 deletions AudioAnalyzer/FormAnalyzerWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion AudioAnalyzer/FormAnalyzerWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private void FormAnalyzerWindow_Load(object sender, EventArgs e)

frequencyDomain = new ChartSelectionHelper(chartFrequencyDomain);

selectedFFTAlgorithm = FFTAlgorithms.HomemadeFFT;
selectedFFTAlgorithm = FFTAlgorithms.RobustFFT;
}

private void UpdateStatusStrip(string msg)
Expand Down

0 comments on commit b174130

Please sign in to comment.