예제 #1
0
    void DynamicLoudnessCH2012::configureModelParameters(const string& setName)
    {
        //common to all
        setRate(1000);
        setOuterEarType(OME::ANSIS342007_FREEFIELD);
        setSpectrumSampledUniformly(true);
        setHoppingGoertzelDFTUsed(false);
        setExcitationPatternInterpolated(false);
        setInterpolationCubic(true);
        setSpecificLoudnessOutput(true);
        setBinauralInhibitionUsed(true);
        setPresentationDiotic(true);
        setFirstSampleAtWindowCentre(true);
        setFilterSpacingInCams(0.1);
        setCompressionCriterionInCams(0.0);
        attackTimeSTL_ = 0.016;
        releaseTimeSTL_ = 0.032;
        attackTimeLTL_ = 0.1;
        releaseTimeLTL_ = 2.0;

        if (setName == "Faster")
        {
            setFilterSpacingInCams(0.5);
            setCompressionCriterionInCams(0.3);
            LOUDNESS_DEBUG(name_ << ": using a filter spacing of 0.5 Cams"
                   << " with 0.3 Cam spectral compression criterion.");
        }
        else if (setName != "CH2012")
        {
            configureModelParameters("CH2012");
            LOUDNESS_DEBUG(name_ << "Using Settings from Chen and Hu 2012 paper.");
        }
    }
예제 #2
0
    void DynamicLoudnessGM2002::configureModelParameters(const string& setName)
    {
        //common to all
        setRate(1000);
        setOuterEarFilter(OME::ANSIS342007_FREEFIELD);
        setMiddleEarFilter(OME::ANSIS342007_MIDDLE_EAR_HPF);
        setSpectrumSampledUniformly(true);
        setHoppingGoertzelDFTUsed(false);
        setSpectralResolutionDoubled(false);
        setExcitationPatternInterpolated(false);
        setInterpolationCubic(true);
        setFilterSpacingInCams(0.25);
        setCompressionCriterionInCams(0.0);
        setRoexBankFast(false);
        setSpecificLoudnessANSIS342007(false);
        setFirstSampleAtWindowCentre(true);
        setPresentationDiotic(true);
        setBinauralInhibitionUsed(true);
        setPartialLoudnessUsed(true);
        configureSmoothingTimes("GM2002");

        if (setName != "GM2002")
        {
            if (setName == "Faster")
            {
                setRoexBankFast(true);
                setExcitationPatternInterpolated(true);
                setFilterSpacingInCams(0.5);
                setCompressionCriterionInCams(0.2);
                LOUDNESS_DEBUG(name_ << ": Using faster params for Glasberg and Moore's 2002 model.");
            }
            else if (setName == "Recent")
            {
                configureSmoothingTimes("MGS2003");
                setSpecificLoudnessANSIS342007(true);
                LOUDNESS_DEBUG(name_
                        << ": Using updated "
                        << "time-constants from 2003 paper and high-level specific "
                        << "loudness equation (ANSI S3.4 2007)."); 
            }
            else if (setName == "FasterAndRecent")
            {
                configureSmoothingTimes("MGS2003");
                setSpecificLoudnessANSIS342007(true);
                setRoexBankFast(true);
                setExcitationPatternInterpolated(true);
                setFilterSpacingInCams(0.5);
                setCompressionCriterionInCams(0.2);
                LOUDNESS_DEBUG(name_
                        << ": Using faster params and "
                        << "updated time-constants from 2003 paper and "
                        << "high-level specific loudness equation (ANSI S3.4 2007).");
            }
            else if (setName == "WEAR2015")
            {
                setSpecificLoudnessANSIS342007(true);
                setRoexBankFast(true);
                setExcitationPatternInterpolated(false);
                setFilterSpacingInCams(1.25);
                setCompressionCriterionInCams(0.7);
                LOUDNESS_DEBUG(name_
                        << ": Using faster params as per Ward et al. (2015) and "
                        << "high-level specific loudness equation (ANSI S3.4 2007).");
            }
            else
            {
                LOUDNESS_DEBUG(name_
                        << ": Using original params from Glasberg and Moore 2002.");
            }
        }
    }