Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: peak frequency of files... (Read 2573 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

peak frequency of files...

Is there a feature or plugin in foobar2000 to show the peak frequency and/or frequency cut off of audio...

It would be nice to know what these values are, I know you have the Khz which the file is decoded at but that's not the input, in the case of lossy formats such as ogg vorbis is can be anywhere from 16khz to 22khz depending on what encoding setting is used. It would also be nice if you could see the peak frequencies of lossless files, especially 24bit flacs.

There probably is something somewhere to show you this, I don't think the dynamic range meter plugin shows this, I could be mistaken are there any others?

peak frequency of files...

Reply #1
Why would the maximum frequency component be more insteresting for 24bit flacs? Bit depth has nothing to do with frequency bandwidth.

Naturally, the maximum possible frequency that can be expressed by any digital signal is a little less than half the sample rate, but getting the actual highest frequency used in any one song, as far as I know, would be very computationally expensive, since you'd have to decode the entire file and analyze its spectrum, and then the final answer can vary slightly depending on what parameters you use for the math.

peak frequency of files...

Reply #2
Activate the spectrogram and a suitable scale, and judge for yourself from there. That’s about as close as you can get without, as dhromed indicated, having to do a lot of work that may not give you any more certain an answer. Actually, it’s probably more accurate since, in the most contrived hypothetical scenario, there might be one high-frequency blip in a file that would give a completely misleading picture of its general content if trusted without visual confirmation.

peak frequency of files...

Reply #3
in the most contrived hypothetical scenario, there might be one high-frequency blip in a file that would give a completely misleading picture of its general content if trusted without visual confirmation.


I hadn't thought of that. In fact I don't even think it's that contrived, since plenty of generated electronic music has above-average content in high regions, even if it's completely inaudible.

peak frequency of files...

Reply #4
I am currently using a spectrum visualization (Channel Spectrum panel), it does have some sort of scale option but it does not indicate what the scale is... I assume a normal 44.1khz input shows 22KHz... For frequencies above that I have to get a calculator out and do (total frequency / 2 / scale * the highest point on the scale I see)... There must be a better way .

And when I say 24bit, there is 48KHz, 88KHz, 96KHz,176KHz and 192Khz 24bit flacs (obviously everything much above 20-22khz is not audible) not sure why they bother with anything above 88khz even when transcoding/downsampling. From what I can see most of these 24bit flacs don't go much above 22khz anyway.

peak frequency of files...

Reply #5
Checking of cut off frequency is easy with spectrogram, but it would be much easier if spectrogram had a (configurable) measuring marks on frequency scale. Currently I have a "hardware" workaround. I use a "hardware" ruler and I stretch spectrogram accordingly to sampling frequency of file - I make it 11 cm in height on my screen for 44 kHz sampled files - in this case every one kHz is 0,5 cm. For 48 kHz files I stretch it to 12 cm and for 96 to 24 cm (mono display of spectrogram is necessary). For greater sampling frequencies "ruler analysis resolution" must be lowered - to 0,25 cm per one kHz (for 192 kHz sampling frequency). For higher sampling frequencies it must be again lowered... But it's very very rare situation that you get file sampled faster than 192 kHz

peak frequency of files...

Reply #6
Checking of cut off frequency is easy with spectrogram, but it would be much easier if spectrogram had a (configurable) measuring marks on frequency scale.
Oops, I thought it did!

Currently I have a "hardware" workaround. I use a "hardware" ruler and I stretch spectrogram accordingly to sampling frequency of file - I make it 11 cm in height on my screen for 44 kHz sampled files - in this case every one kHz is 0,5 cm.
For frequencies above that I have to get a calculator out and do (total frequency / 2 / scale * the highest point on the scale I see)... There must be a better way .
But isn’t the vertical scale logarithmic? In which case, these linear measures would give incorrect results.

peak frequency of files...

Reply #7
Vertical scale is configurable with right-click menu as linear or logarithmic. Of course I configured it as linear on my foobar installation.
Unfortunately frequency scale don't have any measuring marks - not with nor even without frequency expressed in numbers.

peak frequency of files...

Reply #8
The other way to maintain a consistent (but still unmarked) vertical scale when comparing files is to run a Resampler, e.g. to 48000 Hz, in your DSP which is often what Windows Mixer is using anyway unless you bypass it. If you really want to measure it carefully, programs like the free Audacity editor include a scale and you can zoom in or out on the vertical scale. The spectrum analyzer in fb2k can also be set to many more bars, with scale markings if there's room to write the text, and gives a general idea of what frequencies happened in the last second or two.
Dynamic – the artist formerly known as DickD

peak frequency of files...

Reply #9
^^...

Still would be better if the spectrum thingy markings told you what the frequencies are, at least mark the major bits .

Oh well, was only trying to initially work out what the frequency cut off of an OPUS file was... at least I figured out it's 20KHz or just above even when encoded at 64kbps... OGG only gets ~18KHz at 112kbps... what the quality within that range is debatable though .

Was just hard to measure beings OPUS is 48KHz scale and OGG was 44.1KHz... then comparing against flacs to see what it is without being made lossy... lots of using a calculator and counting the number of lines on the screen LOL.

peak frequency of files...

Reply #10
Opus is quite complex encoder. It can use hybrid coding, with SILK codec used below 8kHz and CELT above 8kHz or it can use CELT in whole band - depending on bitrate. On higher bitrates CELT is used. You can read more about it's compression techniques and offered quality here: http://wiki.hydrogenaudio.org/index.php?title=Opus

peak frequency of files...

Reply #11
Assuming that you use Columns UI - you can use the excellent Peak Meter/Spectrum component:

http://www.hydrogenaudio.org/forums/index....showtopic=61145

If you are using DUI, this component will make you want to swap to CUI immediately ;-)

X axis is frequency and Y axis is dB - you can configure X axis to go to 26.5 KHz if you really want to - although there is almost no point doing this. You can configure two instances if you like - one for left channel and one for right channel. If you find a file with > 22 KHz frequency (a) you almost certainly won't hear it and (b) you can get distortion if high frequencies are present. See the following article for some painful truths about the badness of 24 bit 192 KHz files :-)

http://people.xiph.org/~xiphmont/demo/neil-young.html


 

peak frequency of files...

Reply #12
I am using columns UI, but have not seen this component before.... will try it out.

If you can set a range no matter what files you play then this will be more useful than what I'm using, cheers .

Edit: It does, although like you said limited to 26khz which is not a problem... up to 22khz is good enough.

Although I do still like my other spectrum graph thingy as it uses as many bars as you have available pixels which looks nicer instead of limited sets of frequencies bars, but it least it shows the scale with text. But in a tabbed CUI can just flick between them so not much of an issue.