Mercurial > hg > silvet
diff src/Silvet.cpp @ 112:2169e7a448c5 bqvec-openmp
Merge from default branch
author | Chris Cannam |
---|---|
date | Wed, 07 May 2014 09:01:32 +0100 |
parents | ac750e222ad3 e282930cfca7 |
children | c4eae816bdb3 |
line wrap: on
line diff
--- a/src/Silvet.cpp Wed May 07 08:55:44 2014 +0100 +++ b/src/Silvet.cpp Wed May 07 09:01:32 2014 +0100 @@ -40,7 +40,8 @@ Silvet::Silvet(float inputSampleRate) : Plugin(inputSampleRate), m_resampler(0), - m_cq(0) + m_cq(0), + m_hqMode(false) { } @@ -129,18 +130,39 @@ Silvet::getParameterDescriptors() const { ParameterList list; + + ParameterDescriptor desc; + desc.identifier = "mode"; + desc.name = "Processing mode"; + desc.unit = ""; + desc.description = "Determines the tradeoff of processing speed against transcription quality"; + desc.minValue = 0; + desc.maxValue = 1; + desc.defaultValue = 0; + desc.isQuantized = true; + desc.quantizeStep = 1; + desc.valueNames.push_back("Draft (faster)"); + desc.valueNames.push_back("Intensive (higher quality)"); + list.push_back(desc); + return list; } float Silvet::getParameter(string identifier) const { + if (identifier == "mode") { + return m_hqMode ? 1.f : 0.f; + } return 0; } void Silvet::setParameter(string identifier, float value) { + if (identifier == "mode") { + m_hqMode = (value > 0.5); + } } Silvet::ProgramList @@ -411,7 +433,7 @@ if (sum < 1e-5) continue; - EM em; + EM em(m_hqMode); for (int j = 0; j < iterations; ++j) { em.iterate(filtered[i + k].data()); }