Пример #1
0
        void UpdateFilter(IFilter fil)
        {
            // calc the Freq response
            FxVectorF power = fil.GetFrequencyResponse(256);

            // scale down
            power.Divide(power.Max());

            // scale up
            power.Multiply(125.0f / 4117.0f);

            // add the power of the filter to the plot
            plot_signal_spectrum.RefreshPlot(power, 1);

            // add the power of the filter to seperate plot with auto fitting of power
            plot_filter_spectrum.RefreshPlot(power, 0);
            plot_filter_spectrum.FitPlots();

            // refresh the canvas
            canvas_audio.ReDraw();

            // set the new filter for calculations
            this.fil = fil;
        }