Skip to content

Commit

Permalink
Name the FX Automation Params better (#1566)
Browse files Browse the repository at this point in the history
The FX Automation Param names were a mess. Was FX6 a send or a master?
So use consisnent names in the UI and in the automation params.

Closes #1540
  • Loading branch information
baconpaul authored Feb 12, 2020
1 parent 2985068 commit 89f83f7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
31 changes: 30 additions & 1 deletion src/common/Parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,36 @@ void create_fullname(char* dn, char* fn, ControlGroup ctrlgroup, int ctrlgroup_e
}
break;
case cg_FX:
sprintf(prefix, "FX%i", ctrlgroup_entry + 1);
switch( ctrlgroup_entry )
{
case 0:
sprintf( prefix, "FX A1" );
break;
case 1:
sprintf( prefix, "FX A2" );
break;
case 2:
sprintf( prefix, "FX B1" );
break;
case 3:
sprintf( prefix, "FX B2" );
break;
case 4:
sprintf( prefix, "FX S1" );
break;
case 5:
sprintf( prefix, "FX S2" );
break;
case 6:
sprintf( prefix, "FX M1" );
break;
case 7:
sprintf( prefix, "FX M2" );
break;
default:
sprintf( prefix, "FXERR" );
break;
}
break;
default:
prefix[0] = '\0';
Expand Down
2 changes: 1 addition & 1 deletion src/common/SurgePatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ SurgePatch::SurgePatch(SurgeStorage* storage)
char label[16];
sprintf(label, "p%i", p);
char dawlabel[32];
sprintf(dawlabel, "param %i", p);
sprintf(dawlabel, "Param %i", p + 1);
param_ptr.push_back(
this->fx[fx].p[p].assign(p_id++, 0, label, dawlabel, ct_none, px, py, 0, cg_FX, fx,
true, Surge::ParamConfig::kHorizontal | kHide | ((fx == 0) ? kEasy : 0)));
Expand Down
4 changes: 2 additions & 2 deletions src/common/gui/CSnapshotMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ j;

// CFxMenu

const char fxslot_names[8][NAMECHARS] = {"A Insert 1", "A Insert 2", "B Insert 1", "B Insert 2",
"Send FX 1", "Send FX 2", "Master 1", "Master 2"};
const char fxslot_names[8][NAMECHARS] = {"A Insert FX 1", "A Insert FX 2", "B Insert FX 1", "B Insert FX 2",
"Send FX 1", "Send FX 2", "Master FX 1", "Master FX 2"};

std::vector<float> CFxMenu::fxCopyPaste;

Expand Down

0 comments on commit 89f83f7

Please sign in to comment.