Fix off by 1 qvar errors, var names

This commit is contained in:
Carmelo Piccione
2020-01-31 22:41:37 -05:00
parent 0758b042be
commit e8343b3f72
3 changed files with 5 additions and 5 deletions

View File

@ -396,7 +396,7 @@ int BuiltinParams::load_all_builtin_param(const PresetInputs & presetInputs, Pre
for (unsigned int i = 0; i < NUM_Q_VARIABLES;i++) {
std::ostringstream os;
os << "q" << i;
os << "q" << i+1;
load_builtin_param_float(os.str().c_str(), (void*)&presetOutputs.q[i], NULL, P_FLAG_QVAR, 0, MAX_DOUBLE_SIZE, -MAX_DOUBLE_SIZE, "");
}

View File

@ -208,9 +208,9 @@ CustomShape::CustomShape ( int _id ) : Shape()
abort();
}
for (unsigned int i = 1; i <= NUM_Q_VARIABLES;i++) {
for (unsigned int i = 0; i < NUM_Q_VARIABLES;i++) {
std::ostringstream os;
os << "q" << i;
os << "q" << i+1;
param = Param::new_param_float ( os.str().c_str(), P_FLAG_QVAR, &this->q[i], NULL, MAX_DOUBLE_SIZE,
-MAX_DOUBLE_SIZE, 0.0 );
if ( !ParamUtils::insert ( param, &this->param_tree ) )

View File

@ -396,9 +396,9 @@ CustomWave::CustomWave(int _id) : Waveform(512),
abort();
}
for (unsigned int i = 1; i <= NUM_Q_VARIABLES;i++) {
for (unsigned int i = 0; i < NUM_Q_VARIABLES;i++) {
std::ostringstream os;
os << "q" << i;
os << "q" << i+1;
param = Param::new_param_float ( os.str().c_str(), P_FLAG_QVAR, &this->q[i], NULL, MAX_DOUBLE_SIZE,
-MAX_DOUBLE_SIZE, 0.0 );
if ( !ParamUtils::insert ( param, &this->param_tree ) )