Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ndst in ./src/lldcore/intensity.cpp #51

Open
nick-parslow opened this issue Jul 12, 2022 · 2 comments
Open

Ndst in ./src/lldcore/intensity.cpp #51

nick-parslow opened this issue Jul 12, 2022 · 2 comments

Comments

@nick-parslow
Copy link

nick-parslow commented Jul 12, 2022

Hi, I was toying around with the intensity/loudness calculations and I noticed that if I make a standard config with frame step 0.1s and frame width of 0.25s:

   // The frame size in seconds (0.0 = full input, same as frameMode=full)
frameSize = 0.025000

   // The frame step (frame sampling period) in seconds (0.0 = set to the same value as 'frameSize')
frameStep = 0.010000

then Ndst always seems to have value 1, so the line:

long safeN = MIN(Nsrc,MIN(nWin,Ndst));

is always 1 (while Nsrc and nWin will usually be 400 for 16kHz) and so only the first datapoint in the frame is used (and the hamming window is effectively just a scaling value).

This looks like a bug but maybe I'm just mis-interpreting or mis-using the code (?) Is there maybe a way to get Ndst to behave better or maybe is this expected?

@chausner-audeering
Copy link
Contributor

Have you tried with different frameSize/frameStep settings to see for which you get the described behaviour? I would also check which of the three values (Nsrc, nWin and Ndst) becomes 1 and traceback in source where that value comes from.

@nick-parslow
Copy link
Author

The problem is defo 'Ndst' (or the logic of using it in that line), the other 2 get set to the correct values

I just tried with :
frameSize = 0.01, frameStep = 0 (so will match frameSize) - no change, Nsrc and Nwin are 160, Ndst is 1 for all windows
frameSize = 0.1, frameStep = 0 (so will match frameSize) - no change, Nsrc and Nwin are 1600, Ndst is 1 for all windows
frameSize = 1, frameStep = 0.5 - no change, Nsrc and Nwin are 16000, Ndst is 1 for all windows

Unfortunately I haven't worked out where the Ndst is being set, I'm assuming there's a loop over the windows set up with frameSize and frameStep and because there's just one output value, Ndst ends up as 1.
likely candidates I guess are:
./src/core/winToVecProcessor.cpp
./src/dspcore/windower.cpp
but not sure atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants