ParameterDescriptor ComponentFactory::getParameterDescriptor( const std::string& component, const std::string& param) { const Component* c = getPrototype(component); if (!c) return ParameterDescriptor(); const ParameterDescriptorList& pList = c->getParameterDescriptorList(); for (size_t i = 0; i < pList.size(); i++) { if (pList[i].m_identifier == param) return pList[i]; } assert(false); return ParameterDescriptor(); }
MF0UA::ParameterList MF0UA::getParameterDescriptors() const { ParameterList list; // If the plugin has no adjustable parameters, return an empty // list here (and there's no need to provide implementations of // getParameter and setParameter in that case either). // Note that it is your responsibility to make sure the parameters // start off having their default values (e.g. in the constructor // above). The host needs to know the default value so it can do // things like provide a "reset to default" function, but it will // not explicitly set your parameters to their defaults for you if // they have not changed in the mean time. // N merged frames (only for merged alg?) // kRES? // kMINPEAKVALUE? // MAX CANDIDATES // kLOUDNESS?? // kSIL?? ParameterDescriptor d; d.identifier = "algorithm"; d.name = "Algorithm"; d.description = "Algorithms corresponding to the extended method published in \"Efficient methods for joint estimation of multiple fundamental frequencies in music signals\", A. Pertusa and J. M. Iñesta, EURASIP Journal on Advances in Signal Processing (2012), 2012:27"; d.unit = ""; d.isQuantized = true; d.quantizeStep=1; d.minValue=0; d.maxValue=2; d.defaultValue = 0; d.valueNames.push_back("EURASIP12"); d.valueNames.push_back("EURASIP12 + tracking"); d.valueNames.push_back("Onset-based"); list.push_back(d); d=ParameterDescriptor(); d.identifier="maxpolyphony"; d.name="Maximum polyphony"; d.description="Maximum number of simultaneous sources"; d.unit=""; d.isQuantized=true; d.quantizeStep=1; d.minValue=1; d.maxValue=10; d.defaultValue=6; list.push_back(d); d=ParameterDescriptor(); d.identifier="lowestnote"; d.name="Minimum fundamental frequency"; d.description="Lowest note frequency"; d.isQuantized=false; d.minValue=1; d.maxValue=2500; d.defaultValue=38; d.unit="Hz"; list.push_back(d); d=ParameterDescriptor(); d.identifier="highestnote"; d.name="Maximum fundamental frequency"; d.description="Highest note frequency"; d.isQuantized=false; d.minValue=1; d.maxValue=2500; d.defaultValue=2100; d.unit="Hz"; list.push_back(d); d=ParameterDescriptor(); d.identifier="minnoteduration"; d.name="Minimum note duration"; d.description="Minimum note duration"; d.isQuantized=false; d.minValue=0; d.maxValue=0.5; d.defaultValue=0.023; d.unit="s"; list.push_back(d); return list; }