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

spectrum (samples) passed as input to CentralMoments in FreeSoundExtractor, but default 'pdf' mode is not overridden #1201

Open
aginum opened this issue Nov 8, 2021 · 0 comments

Comments

@aginum
Copy link

aginum commented Nov 8, 2021

From FreesoundLowlevelDescriptors.cpp:

// Spectral Central Moments Statistics
Algorithm* cm = factory.create("CentralMoments",
                               "range", sampleRate * 0.5);
Algorithm* ds = factory.create("DistributionShape");
spec->output("spectrum") >> cm->input("array");
cm->output("centralMoments") >> ds->input("centralMoments");
ds->output("kurtosis") >> PC(pool, nameSpace + "spectral_kurtosis");
ds->output("spread") >> PC(pool, nameSpace + "spectral_spread");
ds->output("skewness")>> PC(pool, nameSpace + "spectral_skewness");

As far as I can see from this code fragment, magnitude spectrum is passed to cm as is and cm is initialized with default mode (which is pdf, expecting input data to be a probability density function values).

I assume proper mode for this input would be sample. Am I missing something?

@aginum aginum changed the title spectrum (samples) passed as input to CentralMoments, but default 'pdf' mode is not overridden spectrum (samples) passed as input to CentralMoments in FreeSoundExtractor, but default 'pdf' mode is not overridden Nov 8, 2021
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

1 participant