Mercurial > hg > nnls-chroma
diff Chordino.cpp @ 89:7af5312e66f8 matthiasm-plugin
new boost N parameter in chordino, chord dictionary loaded on initialisation (not construction) of plugin
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Wed, 01 Dec 2010 23:08:55 +0900 |
parents | e5c16976513d |
children | b56dde3417d4 |
line wrap: on
line diff
--- a/Chordino.cpp Wed Dec 01 21:18:49 2010 +0900 +++ b/Chordino.cpp Wed Dec 01 23:08:55 2010 +0900 @@ -37,7 +37,6 @@ { if (debug_on) cerr << "--> Chordino" << endl; // get the *chord* dictionary from file (if the file exists) - m_chordnames = chordDictionary(&m_chorddict, &m_chordnotes); } @@ -146,21 +145,16 @@ d3.isQuantized = false; list.push_back(d3); - // ParameterDescriptor d4; - // d4.identifier = "chromanormalize"; - // d4.name = "chroma normalization"; - // d4.description = "How shall the chroma vector be normalized?"; - // d4.unit = ""; - // d4.minValue = 0; - // d4.maxValue = 3; - // d4.defaultValue = 0; - // d4.isQuantized = true; - // d4.valueNames.push_back("none"); - // d4.valueNames.push_back("maximum norm"); - // d4.valueNames.push_back("L1 norm"); - // d4.valueNames.push_back("L2 norm"); - // d4.quantizeStep = 1.0; - // list.push_back(d4); + ParameterDescriptor boostn; + boostn.identifier = "boostn"; + boostn.name = "boost N"; + boostn.description = "Relative weight of the N label."; + boostn.unit = ""; + boostn.minValue = 1.0; + boostn.maxValue = 2.0; + boostn.defaultValue = 1.0; + boostn.isQuantized = false; + list.push_back(boostn); return list; } @@ -236,7 +230,7 @@ if (!NNLSBase::initialise(channels, stepSize, blockSize)) { return false; } - + m_chordnames = chordDictionary(&m_chorddict, &m_chordnotes, m_boostN); return true; } @@ -260,8 +254,8 @@ Chordino::FeatureSet Chordino::getRemainingFeatures() { - cerr << hw[0] << hw[1] << endl; - if (debug_on) cerr << "--> getRemainingFeatures" << endl; + // cerr << hw[0] << hw[1] << endl; + if (debug_on) cerr << "--> getRemainingFeatures" << endl; FeatureSet fsOut; if (m_logSpectrum.size() == 0) return fsOut; int nChord = m_chordnames.size();