Open Antoine101 opened 1 year ago
Hi,
This is a great observation. During the validation procedure, all test signals are sampled at 48kHz to get a spectrum covering the whole auditory range, that's why we didn't notice. We'll have to add a check about that.
In the case of considering a few frequency bands only, we could add an option to set other values at 0 by default. However, depending on the type of signal you analyze, you could miss some information and significantly change the overall sharpness value. If the omitted bands have a non-zero loudness value, you have to be aware that omitting this noise will impact the sharpness values, and I guess the output won't be coherent with the acum definition. However, if the omitted bands have a zero loudness, this shouldn't change the result.
If your study focuses on a specific frequency range, you could also use the specific value only ;)
Cheers, Salomé
Hello,
After further investigation, the ISO 532B standard we used to implemente loudness specifies that the sampling frequency should be of 48 kHz minimum. In case of a lower sampling frequency, the signal should be resampled. Since this loudness implementation is used into the sharpness_din_st function, the same rule applies here.
We are going to add a test at the beginning of all concerned functions to raise a warning if the sampling frequency is too low, and we'll resample the signal in that case.
Thanks for raising this issue, Salomé
EDIT : See PR#72
Hi Salomé,
Thank you for reviewing this issue! I will resample my signals before computing the metrics then. For performance reasons we have them sampled at 25600Hz, and resampling them to 48000Hz would certainly be time-consuming. I was asking that because my goal is to distinguish different classes of sounds based on these metrics, so I don't really care about the accuracy of the absolute value in itself. I was thinking that accounting for bands only up to 12800Hz may be enough to show a relative difference between sounds of different classes.
Hi Antoine,
In our case we stick to the standard requirements so that the results correspond to the defined procedure and give the same values. But in your case I guess it makes sense to use the data you have to rank your signal with the first bands only...if you're sure the distinctive information is not located at higher frequencies !
PR#72 including the sampling frequency check has been merged, you'll have to get around it in your version to use the first bands only ;)
Salomé
Hi,
I am trying to calculate Sharpness on 200ms temporal blocks of a signal sampled at 25600Hz. I get the following error:
Probing
noct_spectrum
function with print statements, I see that the last value offc_vec
is 12589.25411794, which doesn't meet the criteria.Why is that? Are there some requirements on the sampling rate of the signal I pass to the sharpness function? I can't found anything of the sort in the doc.
Thanks in advance!
Antoine
EDIT: After further investigation I understood that it tries to take into account all third octave bands, hence the error in my case where the sampling rate and thus max frequency is too low. Would it be possible to calculate the metrics by omitting some bands? Perhaps it could still be a valuable acoustic indicator/feature.