private void btnGenerate_Click(object sender, EventArgs e) { this.rawWave = SFXUtils.GenerateWave((256 * 2), freqs.ToArray()); SFXUtils.PadArray(ref this.rawWave); this.picWaveRaw.Refresh(); }
private void btnGetFFT_Click(object sender, EventArgs e) { this.sfxWave = SFXUtils.FFT(this.rawWave); string msg = ""; for (int i = 0; i < this.sfxWave.Count / 2; ++i) { double fftRound = Math.Round(Complex.Abs(this.sfxWave[i]) * 1000.0) / 1000.0; if (fftRound > double.Epsilon) { msg += i + " => " + fftRound + Environment.NewLine; } } MessageBox.Show(msg); }