private void button1_Click_1(object sender, EventArgs e) { SetInterface(); //считаем функции var energySignal = Energy(); var corellationOneSignal = CorrelationOne(); var zerosCrossingSignal = ZerosCrossing(); //записываем результат в WAV файл WriteParameter(energySignal, "energy.wav"); WriteParameter(corellationOneSignal, "corellation.wav"); WriteParameter(zerosCrossingSignal, "zeros.wav"); _generalFeature = new float[energySignal.Length]; for (int i = 0; i < _generalFeature.Length; i++) { _generalFeature[i] = corellationOneSignal[i] * energySignal[i];// / zerosCrossingSignal[i]; } if (!_borderValueSet) { var histogramWindow = new Histograms(); histogramWindow.Show(this); histogramWindow.GeneralSignal = _generalFeature; _borderValueSet = false; } else { Split(); } }
private void button1_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog(this) == DialogResult.OK) { ReadFile(); SetInterface(); //считаем функции var energySignal = Energy(); var corellationOneSignal = CorrelationOne(); var zerosCrossingSignal = ZerosCrossing(); //записываем результат в WAV файл WriteParameter(energySignal, "energy.wav"); WriteParameter(corellationOneSignal, "corellation.wav"); WriteParameter(zerosCrossingSignal, "zeros.wav"); _generalFeature = new float[energySignal.Length]; for (int i = 0; i < _generalFeature.Length; i++) { _generalFeature[i] = corellationOneSignal[i] * energySignal[i];// / zerosCrossingSignal[i]; } if (!_borderValueSet) { var histogramWindow = new Histograms(); histogramWindow.Show(this); histogramWindow.GeneralSignal = _generalFeature; _borderValueSet = false; } else { Split(); } WriteToTextFile(_generalFeature, "general.txt"); WriteToTextFile(energySignal, "energy.txt"); WriteToTextFile(corellationOneSignal, "corel.txt"); WriteToTextFile(zerosCrossingSignal, "zeros.txt"); button1.Enabled = true; } }