Mercurial > hg > match-vamp
changeset 136:2cbf6237c822 refactors
Expose silence threshold as parameter
author | Chris Cannam |
---|---|
date | Fri, 19 Dec 2014 10:19:33 +0000 |
parents | 42381e437fcd |
children | a1de1888a96c |
files | src/MatchVampPlugin.cpp |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/MatchVampPlugin.cpp Thu Dec 18 17:56:54 2014 +0000 +++ b/src/MatchVampPlugin.cpp Fri Dec 19 10:19:33 2014 +0000 @@ -204,6 +204,15 @@ desc.quantizeStep = 1; list.push_back(desc); + desc.identifier = "silencethreshold"; + desc.name = "Silence Threshold"; + desc.description = "Total frame energy threshold below which a feature will be regarded as silent"; + desc.minValue = 0; + desc.maxValue = 1; + desc.defaultValue = m_defaultFcParams.silenceThreshold; + desc.isQuantized = false; + list.push_back(desc); + desc.identifier = "gradientlimit"; desc.name = "Gradient Limit"; desc.description = "Limit of number of frames that will be accepted from one source without a frame from the other source being accepted"; @@ -270,6 +279,8 @@ return (float)m_params.blockTime; } else if (name == "smooth") { return m_smooth ? 1.0 : 0.0; + } else if (name == "silencethreshold") { + return m_fcParams.silenceThreshold; } return 0.0; @@ -296,6 +307,8 @@ m_params.blockTime = value; } else if (name == "smooth") { m_smooth = (value > 0.5); + } else if (name == "silencethreshold") { + m_fcParams.silenceThreshold = value; } }