示例#1
0
        public void ApplyGain(double dbGain, bool applyToWindow = false)
        {
            FFTs stft = parentRef.GetSTFT();
            SelectedWindowIndices indices = parentRef.GetSelectedWindowIndices();

            if (applyToWindow)
            {
                if (!indices.Exists())
                {
                    MessageBox.Show("There is no window selected!");
                    return;
                }
                Processing.AddGain(stft, dbGain, indices, dB: true);
            }
            else
            {
                Processing.AddGain(stft, dbGain, dB: true);
            }
        }
示例#2
0
        public void ApplyWhiteNoiseFilter(double threshold, bool applyToWindow = false)
        {
            FFTs stft = parentRef.GetSTFT();
            SelectedWindowIndices indices = parentRef.GetSelectedWindowIndices();

            if (applyToWindow)
            {
                if (!indices.Exists())
                {
                    MessageBox.Show("There is no window selected!");
                    return;
                }
                Filters.WhiteNoiseFilter(stft, threshold, indices);
            }
            else
            {
                Filters.WhiteNoiseFilter(stft, threshold);
            }
        }
 private void ButtonApplyToWindow_Click(object sender, RoutedEventArgs e)
 {
     AudioAnalysis.Processing.FrequencyShifter(parentRef.GetSTFT(), (int)SliderFreqShift.Value, parentRef.GetSelectedWindowIndices(),
                                               order: (int)SliderOrder.Value, thresh: SliderThreshold.Value);
 }