private void causal_Click(object sender, EventArgs e) { int windowSize; int hopSize; int filterSize; int fc; int.TryParse(this.WindowSize.Text, out windowSize); int.TryParse(this.R.Text, out hopSize); int.TryParse(this.L.Text, out filterSize); int.TryParse(this.Fc.Text, out fc); Stopwatch time = new Stopwatch(); time.Start(); float[] result = _audio.FrequencyFiltration(windowSize, filterSize, fc, hopSize, windowType.SelectedIndex, "casual"); time.Stop(); MessageBox.Show(time.ElapsedMilliseconds.ToString() + " ms"); #region filterChar CharWindow resultSignalChar = new CharWindow(); resultSignalChar.setPropert(); resultSignalChar.Histogram.Series.Add("WindowCharm"); resultSignalChar.Text = "SignalChar"; resultSignalChar.Histogram.Series["WindowCharm"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; resultSignalChar.Histogram.Series["WindowCharm"].MarkerSize = 2; resultSignalChar.Histogram.ChartAreas[0].AxisX.Title = "Index"; resultSignalChar.Histogram.ChartAreas[0].AxisY.Title = "signal value"; for (int i = 0; i < result.Count(); i++) { resultSignalChar.Histogram.Series["WindowCharm"].Points.AddXY(i, result[i]); } resultSignalChar.Show(); #endregion SoundUtil.SaveSound("freqCasualFilter", _audio.fileName, _audio.sampleRate, result); }