Skip to content

Commit

Permalink
fix wrong scaling of three-way switches
Browse files Browse the repository at this point in the history
  • Loading branch information
mzuther committed Jul 9, 2020
1 parent 01ab57b commit c55b976
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/ProtoFaust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,26 +104,29 @@ void ProtoFaust::configParameter( int widgetType,
1.0f,
0.0f,
"" );

break;

case ProtoFaustWidget::THREE_WAY_SWITCH:
case ProtoFaustWidget::KNOB_WHITE:

// values: 0.0, 1.0, 2.0; scaled in ProtoFaust::updateParameter()
// default: 0.0 (bottom)
configParam( parameterId,
0.0f,
2.0f,
0.0f,
"" );
break;

case ProtoFaustWidget::KNOB_WHITE:
case ProtoFaustWidget::KNOB_RED:

// three-way-switch:
// values: 0.0, 0.5, 1.0; see ProtoFaust::updateParameter()
// default: 0.5 (center)
//
// knob:
// range: 0.0 to 1.0
// default: 0.5 (centered)
// range: 0.0 to 1.0
// default: 0.5 (centered)
configParam( parameterId,
0.0f,
1.0f,
0.5f,
"" );

break;
}
}
Expand Down

0 comments on commit c55b976

Please sign in to comment.