Page 4 of 7
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Sun Jan 18, 2015 5:22 am
by Robert J. H.
@Steve
Sorry, but I can't reply to the topic "Spectral Editing" on the Audacity Mailing list. I don't have an account there.
That's why I've posted it on Devel in the first place.
In general, I share your opinions there.
The spectral Selection toolbar should perhaps have its own effect menu--which would lead to another plugin type as you've already pointed out.
Gale:
> Wouldn't it make sense to allow spectral editing in waveform* view
> when Spectral Selection Toolbar is open?
Steve:
Yes it would make sense, but Nyquist does not know if the Spectral
Selection Toolbar is open or not.
But it sees at least if any of the four frequency types are defined, thus no need to give out an error message while Wave Track view is on.
However, not a big deal for now.
I've brought this on the table because it would have been convenient to use the spectral selection for the Vocal Removal/Isolation as well. Sighted users would certainly profit from defining the vocal range in the spectrogram while vi users should still be able to enter the range manually.
We could perhaps enable/disable the frequency controls depending on the current view and the selection/visibility of the spectral selection toolbar.
Just some thoughts for 2.1.1 plus.
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Sun Jan 18, 2015 5:41 am
by Robert J. H.
Paul L wrote:steve wrote:Paul L wrote:Robert, lowpass.ny uses lowpass2 when you choose 6 dB/octave rolloff, and highpass.ny uses highpass2.
No, they use "
lp" and "
hp" respectively for 6 dB per octave.
You are right, and I have been a fool. I am embarrassed.
We can fix the manual or change the effects!
I say change the effects! I think it's better to have the slighter effect that you can repeat ad lib!
It depends on what the user expects.
If I see a rectangle in the spectrum view, then the filtering implies a somewhat surgical character-- cut/remove all inside.
It needs about 8 repetitions of the lp/hp effects to push the content down to a non-audible level.
It comes all down to the well-known filter problmatic.
Pass band versus stop band versus transition versus phase distortion etc.
I'll try to provide a Spectral Edit Fir filter implementation for the control freaks.
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Sun Jan 18, 2015 7:04 am
by Paul L
Robert J. H. wrote:
I'll try to provide a Spectral Edit Fir filter implementation for the control freaks.
Excellent! I implemented this feature so that advanced users like you could extend it further with Nyquist programming.
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Sun Jan 18, 2015 3:01 pm
by Gale Andrews
Paul L wrote:Gale Andrews wrote:steve wrote:Videogamer555 wrote:I notice a problem in frequency selection in spectrogram in version 2.1.0. When you using the linear frequency display, for selecting the spectrum, it doesn't have the center frequency in the center. Instead it has it below the center.
That is correct. The spectral selection is a fixed order high, low or band pass filter, thus in the case of band pass the centre frequency is
proportionally in the centre, thus it will appear in the centre in Spectrogram (log f) view and below the centre in linear Spectrogram view. This is basic physics.
I certainly agree what "center frequency" means will need properly explaining in the Manual. We may wish to remember the likely skill/knowledge level of the majority of our users.
The question I have is what proportion and what centre are we talking about for the centre line in the Spectrogram views. Are we talking about centre frequencies of band* and notch filters? Anyone can see that the center frequency in either log or linear view for example between a range of 2000 to 8000 Hz is below what some might expect (5000 Hz). Neither is it the geometric mean which I understand would be 4000 Hz.
I guess many people will ask this, so I'll be first.
Gale
"Center frequency" meaning geometric mean is the usual technical jargon, is it not?
I am not a mathematician or physicist, like most users. I think many normal users may think centre of 2000 and 8000 Hz is 5000 Hz, like my mystery shoppers do.
The Manual did not say, but I "guessed" it was supposed to be geometric mean. But that is not where the spectrogram display puts the centre frequency.
Paul L wrote:If you select from 2000 Hz to 8000, surely 4000 should be the center. I just confirmed that this is so on my build, in log and linear views, and using the precise readouts of the spectral selection toolbar. If you don't see the same, there is a bug!
It looks like there is a bug sufficient to be confusing when you zoom in to the vertical scale in linear spectrogram view.
I wasn't using Spectral Selection Toolbar (most users won't because it is rightly off by default). However selecting upper and lower frequency limits by aligning with the ticks on the vertical scale I could see that the centre was not 4000 Hz.
So retesting selecting exactly 2000 and 8000 Hz in Spectral Selection Toolbar on Windows 8.1, I now see that the centre is indeed 4000 Hz according to that toolbar, but not in the spectrogram in linear view. The centre drifts above or below 4000 Hz according to the zoom level and position on the vertical scale.

- center_frequency.png (52.79 KiB) Viewed 1134 times
In Spectrogram log(f) view the vertical line seems to be much closer to or actually on 4000 Hz.
Also, the labelling on the vertical scale is not ideal. If I was not fully awake I might think I was selecting an upper frequency of about 8000 Hz here, but I am selecting about 7000 Hz.

- 7k_or_8k.png (15.42 KiB) Viewed 1134 times
And notice that where I have drawn the line for the upper frequency is above the 7000 Hz tick, but is actually below 7000 Hz according to the toolbar.
Gale
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Sun Jan 18, 2015 4:30 pm
by steve
Gale Andrews wrote:It looks like there is a bug sufficient to be confusing when you zoom in to the vertical scale in linear spectrogram view.
The vertical track scale is a bit imprecise, but (on Linux) I can't get it as bad as your illustrations. Is that a platform difference, or does it depend on preference settings?
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Sun Jan 18, 2015 5:09 pm
by Gale Andrews
steve wrote:Gale Andrews wrote:It looks like there is a bug sufficient to be confusing when you zoom in to the vertical scale in linear spectrogram view.
The vertical track scale is a bit imprecise, but (on Linux) I can't get it as bad as your illustrations. Is that a platform difference, or does it depend on preference settings?
Both my images are using default Spectrograms preferences.
The actual min and max frequency chosen in Spectrograms prefs does not make the "drift" better or worse. But merely opening and OK'ing Preferences in any pane, without changing any preferences, redraws the centre frequency line at the correct place. So I guess that could be the key to the solution?
Gale
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Sun Jan 18, 2015 5:23 pm
by Gale Andrews
Gale Andrews wrote:The actual min and max frequency chosen in Spectrograms prefs does not make the "drift" better or worse. But merely opening and OK'ing Preferences in any pane, without changing any preferences, redraws the centre frequency line at the correct place. So I guess that could be the key to the solution?
Only for the centre line. Exercising Prefs does not correct the drawing of Low and High Frequencies.
Gale
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Mon Jan 19, 2015 2:12 am
by Gale Andrews
Robert J. H. wrote:Sorry, but I can't reply to the topic "Spectral Editing" on the Audacity Mailing list. I don't have an account there. That's why I've posted it on Devel in the first place.
Robert, you can subscribe to the -quality list (if you want to) here:
https://lists.sourceforge.net/lists/lis ... ty-quality.
Gale
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Mon Jan 19, 2015 3:58 am
by Videogamer555
Currently, when you select a band (say 100 Hz to 10000 Hz in this example), it uses the logarithmic center, REGARDLESS of which mode you are using for spectrogram. The center frequency is thus 1000 Hz. This should be the selection method ONLY when using the logarithmic spectrogram. When in the linear spectrum mode, it should use the LINEAR center instead, which would be 5050 Hz in this example. You see (100+10000)/2=5050. Sadly, this doesn't work in Audacity. My use of the program is for scientific/technical use, which PRIMARILY uses linear spectrograms for filtering. In this use, the center frequency refers to the midpoint between high_freq and low_freq. That is in general center_freq = (low_freq + high_freq) / 2. Bandpass means keep all frequencies in the range low_freq to high_freq (and reject all other frequencies) and try to keep the pass band as flat as possible, but if there must be one point which is higher than the rest it should be at the center_freq (aka mid_point) which I defined in the previous sentence.
Re: Suggestion (Bandpass Filter and Custom FFT Filter)
Posted: Mon Jan 19, 2015 4:01 am
by steve
Videogamer555 wrote:Currently, when you select a band (say 100 Hz to 10000 Hz in this example), it uses the logarithmic center, REGARDLESS of which mode you are using for spectrogram. The center frequency is thus 1000 Hz. This should be the selection method ONLY when using the logarithmic spectrogram. When in the linear spectrum mode, it should use the LINEAR center instead, which would be 5050 Hz in this example. You see (100+10000)/2=5050. Sadly, this doesn't work in Audacity. My use of the program is for scientific/technical use, which PRIMARILY uses linear spectrograms for filtering. In this use, the center frequency refers to the midpoint between high_freq and low_freq. That is in general center_freq = (low_freq + high_freq) / 2. Bandpass means keep all frequencies in the range low_freq to high_freq (and reject all other frequencies) and try to keep the pass band as flat as possible, but if there must be one point which is higher than the rest it should be at the center_freq (aka mid_point) which I defined in the previous sentence.
That would be a very unusual band pass filter, but such a thing is possible using either the Equalization effect, or writing your own plugin using Nyquist
http://wiki.audacityteam.org/wiki/Nyqui ... _Reference