本文整理汇总了C++中ParameterList::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterList::push_back方法的具体用法?C++ ParameterList::push_back怎么用?C++ ParameterList::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterList
的用法示例。
在下文中一共展示了ParameterList::push_back方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MFCCs
Mfcc::ParameterList
Mfcc::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor desc;
desc.identifier = "nfilters";
desc.name = "Number of filters";
desc.description = "Size of mel filterbank used to compute MFCCs (fixed to 40 for now)";
desc.minValue = 40;
desc.maxValue = 40;
desc.defaultValue = 40;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
desc = ParameterDescriptor();
desc.identifier = "ncoeffs";
desc.name = "Number of coefficients";
desc.description = "Number of output coefficients to compute";
desc.minValue = 1;
desc.maxValue = 100;
desc.defaultValue = 13;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
return list;
}
示例2:
MzSpectrogramFFTW::ParameterList
MzSpectrogramFFTW::getParameterDescriptors(void) const {
ParameterList pdlist;
ParameterDescriptor pd;
// first parameter: The minimum spectral bin to display
pd.identifier = "minbin";
pd.name = "Minimum\nfrequency\nbin";
pd.unit = "";
pd.minValue = 0.0;
pd.maxValue = 30000.0;
pd.defaultValue = 0.0;
pd.isQuantized = 1;
pd.quantizeStep = 1.0;
pdlist.push_back(pd);
// second parameter: The maximum spectral bin to display
pd.identifier = "maxbin";
pd.name = "Maximum\nfrequency\nbin";
pd.unit = "";
pd.minValue = -1.0;
pd.maxValue = 30000.0;
pd.defaultValue = -1.0;
pd.isQuantized = 1;
pd.quantizeStep = 1.0;
pdlist.push_back(pd);
return pdlist;
}
示例3:
PercussionOnsetDetector::ParameterList
PercussionOnsetDetector::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor d;
d.identifier = "threshold";
d.name = "Energy rise threshold";
d.description = "Energy rise within a frequency bin necessary to count toward broadband total";
d.unit = "dB";
d.minValue = 0;
d.maxValue = 20;
d.defaultValue = 3;
d.isQuantized = false;
list.push_back(d);
d.identifier = "sensitivity";
d.name = "Sensitivity";
d.description = "Sensitivity of peak detector applied to broadband detection function";
d.unit = "%";
d.minValue = 0;
d.maxValue = 100;
d.defaultValue = 40;
d.isQuantized = false;
list.push_back(d);
return list;
}
示例4:
FixedTempoEstimator::ParameterList
FixedTempoEstimator::D::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor d;
d.identifier = "minbpm";
d.name = "Minimum estimated tempo";
d.description = "Minimum beat-per-minute value which the tempo estimator is able to return";
d.unit = "bpm";
d.minValue = 10;
d.maxValue = 360;
d.defaultValue = 50;
d.isQuantized = false;
list.push_back(d);
d.identifier = "maxbpm";
d.name = "Maximum estimated tempo";
d.description = "Maximum beat-per-minute value which the tempo estimator is able to return";
d.defaultValue = 190;
list.push_back(d);
d.identifier = "maxdflen";
d.name = "Input duration to study";
d.description = "Length of audio input, in seconds, which should be taken into account when estimating tempo. There is no need to supply the plugin with any further input once this time has elapsed since the start of the audio. The tempo estimator may use only the first part of this, up to eight times the slowest beat duration: increasing this value further than that is unlikely to improve results.";
d.unit = "s";
d.minValue = 2;
d.maxValue = 40;
d.defaultValue = 10;
list.push_back(d);
return list;
}
示例5:
Energy::ParameterList
Energy::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor threshold;
threshold.identifier = "threshold";
threshold.name = "Low energy threshold";
threshold.description = "Ratio of threshold to average energy.";
threshold.unit = "";
threshold.minValue = 0;
threshold.maxValue = 10;
threshold.defaultValue = 1;
threshold.isQuantized = false;
list.push_back(threshold);
ParameterDescriptor root;
root.identifier = "root";
root.name = "Use root";
root.description = "Whether to apply root to energy calc.";
root.unit = "";
root.minValue = 0;
root.maxValue = 1;
root.defaultValue = 1;
root.isQuantized = true;
root.quantizeStep = 1;
list.push_back(root);
return list;
}
示例6:
AmplitudeFollower::ParameterList
AmplitudeFollower::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor att;
att.identifier = "attack";
att.name = "Attack time";
att.description = "The 60dB convergence time for an increase in amplitude";
att.unit = "s";
att.minValue = 0.0f;
att.maxValue = 1.f;
att.defaultValue = 0.01f;
att.isQuantized = false;
list.push_back(att);
ParameterDescriptor dec;
dec.identifier = "release";
dec.name = "Release time";
dec.description = "The 60dB convergence time for a decrease in amplitude";
dec.unit = "s";
dec.minValue = 0.0f;
dec.maxValue = 1.f;
dec.defaultValue = 0.01f;
dec.isQuantized = false;
list.push_back(dec);
return list;
}
示例7:
KeyDetector::ParameterList
KeyDetector::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor desc;
desc.identifier = "tuning";
desc.name = "Tuning Frequency";
desc.description = "Frequency of concert A";
desc.unit = "Hz";
desc.minValue = 420;
desc.maxValue = 460;
desc.defaultValue = 440;
desc.isQuantized = false;
list.push_back(desc);
desc.identifier = "length";
desc.name = "Window Length";
desc.unit = "chroma frames";
desc.description = "Number of chroma analysis frames per key estimation";
desc.minValue = 1;
desc.maxValue = 30;
desc.defaultValue = 10;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
return list;
}
示例8: on_cylinderParameters_clicked
void SegmentationBestFit::on_cylinderParameters_clicked()
{
ParameterList list;
std::vector<float> p = cylinderParameter;
p.resize(7);
QString base = tr("Base");
QString axis = tr("Axis");
QString radius = tr("Radius");
QString x = QString::fromLatin1(" x");
QString y = QString::fromLatin1(" y");
QString z = QString::fromLatin1(" z");
list.push_back(std::make_pair(base + x, p[0]));
list.push_back(std::make_pair(base + y, p[1]));
list.push_back(std::make_pair(base + z, p[2]));
list.push_back(std::make_pair(axis + x, p[3]));
list.push_back(std::make_pair(axis + y, p[4]));
list.push_back(std::make_pair(axis + z, p[5]));
list.push_back(std::make_pair(radius, p[6]));
static QPointer<QDialog> dialog = 0;
if (!dialog)
dialog = new ParametersDialog(cylinderParameter,
new CylinderFitParameter,
list, myMesh, this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
}
示例9:
BarBeatTracker::ParameterList
BarBeatTracker::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor desc;
desc.identifier = "bpb";
desc.name = "Beats per Bar";
desc.description = "The number of beats in each bar";
desc.minValue = 2;
desc.maxValue = 16;
desc.defaultValue = 4;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
// changes are as per the BeatTrack.cpp
//Alpha Parameter of Beat Tracker
desc.identifier = "alpha";
desc.name = "Alpha";
desc.description = "Inertia - Flexibility Trade Off";
desc.minValue = 0.1;
desc.maxValue = 0.99;
desc.defaultValue = 0.90;
desc.unit = "";
desc.isQuantized = false;
list.push_back(desc);
// We aren't exposing tightness as a parameter, it's fixed at 4
// changes are as per the BeatTrack.cpp
//User input tempo
desc.identifier = "inputtempo";
desc.name = "Tempo Hint";
desc.description = "User-defined tempo on which to centre the tempo preference function";
desc.minValue = 50;
desc.maxValue = 250;
desc.defaultValue = 120;
desc.unit = "BPM";
desc.isQuantized = true;
list.push_back(desc);
// changes are as per the BeatTrack.cpp
desc.identifier = "constraintempo";
desc.name = "Constrain Tempo";
desc.description = "Constrain more tightly around the tempo hint, using a Gaussian weighting instead of Rayleigh";
desc.minValue = 0;
desc.maxValue = 1;
desc.defaultValue = 0;
desc.isQuantized = true;
desc.quantizeStep = 1;
desc.unit = "";
desc.valueNames.clear();
list.push_back(desc);
return list;
}
示例10: int
DWT::ParameterList
DWT::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor d;
d.identifier = "scales";
d.name = "Scales";
d.description = "Scale depth";
d.unit = "";
d.minValue = 1.0f;
d.maxValue = 16.0f;
d.defaultValue = 10.0f;
d.isQuantized = true;
d.quantizeStep = 1.0f;
list.push_back(d);
d.identifier = "wavelet";
d.name = "Wavelet";
d.description = "Wavelet type to use";
d.unit = "";
d.minValue = 0.f;
d.maxValue = int(Wavelet::LastType);
d.defaultValue = int(Wavelet::Haar);
d.isQuantized = true;
d.quantizeStep = 1.0f;
for (int i = 0; i <= int(Wavelet::LastType); ++i) {
d.valueNames.push_back(Wavelet::getWaveletName(Wavelet::Type(i)));
}
list.push_back(d);
d.valueNames.clear();
d.identifier = "threshold";
d.name = "Threshold";
d.description = "Wavelet coefficient threshold";
d.unit = "";
d.minValue = 0.0f;
d.maxValue = 0.01f;
d.defaultValue = 0.0f;
d.isQuantized = false;
list.push_back(d);
d.identifier = "absolute";
d.name = "Absolute values";
d.description = "Return absolute values";
d.unit = "";
d.minValue = 0.0f;
d.maxValue = 1.00f;
d.defaultValue = 0.0f;
d.isQuantized = true;
d.quantizeStep = 1.0f;
list.push_back(d);
return list;
}
示例11:
CQChromaVamp::ParameterList
CQChromaVamp::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor desc;
desc.identifier = "lowestoct";
desc.name = "Lowest Contributing Octave";
desc.unit = "";
desc.description = "Octave number of the lowest octave to include in the chromagram. Octave numbering is ASA standard, with -1 as the first octave in the MIDI range and middle-C being C4. The octave starts at C.";
desc.minValue = -1;
desc.maxValue = 12;
desc.defaultValue = defaultLowestOctave;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
desc.identifier = "octaves";
desc.name = "Contributing Octave Count";
desc.unit = "octaves";
desc.description = "Number of octaves to use when generating the Constant-Q transform. All octaves are wrapped around and summed to produce a single octave chromagram as output.";
desc.minValue = 1;
desc.maxValue = 12;
desc.defaultValue = defaultOctaveCount;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
desc.identifier = "tuning";
desc.name = "Tuning Frequency";
desc.unit = "Hz";
desc.description = "Frequency of concert A";
desc.minValue = 360;
desc.maxValue = 500;
desc.defaultValue = defaultTuningFrequency;
desc.isQuantized = false;
list.push_back(desc);
desc.identifier = "bpo";
desc.name = "Bins per Octave";
desc.unit = "bins";
desc.description = "Number of constant-Q transform bins per octave";
desc.minValue = 2;
desc.maxValue = 480;
desc.defaultValue = defaultBPO;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
return list;
}
示例12: getParameterDescriptors
TonalChangeDetect::ParameterList TonalChangeDetect::getParameterDescriptors() const
{
ParameterList list;
ParameterDescriptor desc;
desc.identifier = "smoothingwidth";
desc.name = "Gaussian smoothing";
desc.description = "Window length for the internal smoothing operation, in chroma analysis frames";
desc.unit = "frames";
desc.minValue = 0;
desc.maxValue = 20;
desc.defaultValue = 5;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
desc.identifier = "minpitch";
desc.name = "Chromagram minimum pitch";
desc.unit = "MIDI units";
desc.description = "Lowest pitch in MIDI units to be included in the chroma analysis";
desc.minValue = 0;
desc.maxValue = 127;
desc.defaultValue = 32;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
desc.identifier = "maxpitch";
desc.name = "Chromagram maximum pitch";
desc.unit = "MIDI units";
desc.description = "Highest pitch in MIDI units to be included in the chroma analysis";
desc.minValue = 0;
desc.maxValue = 127;
desc.defaultValue = 108;
desc.isQuantized = true;
desc.quantizeStep = 1;
list.push_back(desc);
desc.identifier = "tuning";
desc.name = "Chromagram tuning frequency";
desc.unit = "Hz";
desc.description = "Frequency of concert A in the music under analysis";
desc.minValue = 420;
desc.maxValue = 460;
desc.defaultValue = 440;
desc.isQuantized = false;
list.push_back(desc);
return list;
}
示例13:
PluginHostAdapter::ParameterList
PluginHostAdapter::getParameterDescriptors() const
{
ParameterList list;
for (unsigned int i = 0; i < m_descriptor->parameterCount; ++i) {
const VampParameterDescriptor *spd = m_descriptor->parameters[i];
ParameterDescriptor pd;
pd.identifier = spd->identifier;
pd.name = spd->name;
pd.description = spd->description;
pd.unit = spd->unit;
pd.minValue = spd->minValue;
pd.maxValue = spd->maxValue;
pd.defaultValue = spd->defaultValue;
pd.isQuantized = spd->isQuantized;
pd.quantizeStep = spd->quantizeStep;
if (pd.isQuantized && spd->valueNames) {
for (unsigned int j = 0; spd->valueNames[j]; ++j) {
pd.valueNames.push_back(spd->valueNames[j]);
}
}
list.push_back(pd);
}
return list;
}
示例14:
MyPlugin::ParameterList
MyPlugin::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.
ParameterDescriptor d;
d.identifier = "parameter";
d.name = "Some Parameter";
d.description = "";
d.unit = "";
d.minValue = 0;
d.maxValue = 10;
d.defaultValue = 5;
d.isQuantized = false;
list.push_back(d);
return list;
}
示例15: dummyEffect
int dummyEffect(const ParameterList & parameterList,
predicateCallbackType predicateCallback,
numericalFluentCallbackType numericalFluentCallback,
int relaxed, vector<double>& writtenVars)
{
ROS_DEBUG("Calling %s module", __func__);
if(predicateCallback == NULL)
return false;
PredicateList pl;
ParameterList paramList;
paramList.push_back(Parameter("","","pos-1"));
pl.push_back(Predicate("free", paramList));
PredicateList* plp = &pl;
bool ret = predicateCallback(plp);
if(!ret)
return false;
if(pl.empty()) // callback removed our predicate!
return false;
// now we could / should react on the value of the predicate. skip
// this for the moment....
std::cout << "(free pos-1) is currently " << pl.front().value <<
std::endl;
// write arbitrary value back
writtenVars[0] = 17.0;
return 0;
}