commit 0aba64e10ccaa11174b3942dba296e3558761bbe
parent 55af29a22702db7932b29a88f668163c325f4937
Author: Matt Demanett <matt@demanett.net>
Date: Wed, 7 Oct 2020 21:41:45 -0400
SWITCH*: make "Disabled" the default inverting option.
Diffstat:
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/README-prerelease.md b/README-prerelease.md
@@ -693,9 +693,9 @@ Identical to MATRIX44, but with switches instead of knobs. All switches default
Note that you can pass attenuated values, by use of Rack's arbitrary parameter-entry feature: right-click a switch, and set its value from -100 to 100% (fractional percentages are allowed). If inverting is disabled, as below, the entry is from 0 to 100%.
The signal inverting behavior may be set with the "Inverting" context menu options:
- - "By param entry" allows negative scale values to be set for a switch by the parameter-entry method, but clicks on a switch will just toggle between on and off. This is the default.
- - "On second click" causes a click on a non-inverting but enabled switch to change to inverting; anotehr click turns it off.
- - "None" disables inverting entirely. This option is handy if you want to map MIDI controller buttons/pads to switches.
+ - "Disabled" disables inverting entirely. This option is the default. It is best if you want to map MIDI controller buttons/pads to switches.
+ - "By param entry" allows negative scale values to be set for a switch by the parameter-entry method, but clicks on a switch will just toggle between on and off.
+ - "On second click" causes a click on a non-inverting but enabled switch to change to inverting; another click turns it off.
Option "Average" sets the output to be the average of its inputs. The divisor for the average is the number of inputs in use; for example, if three inputs are connected, each output will be the sum of those inputs, scaled by the corresponding switch values, and divided by three.
diff --git a/src/matrix_base.cpp b/src/matrix_base.cpp
@@ -361,22 +361,22 @@ void SwitchMatrixModuleWidget::contextMenu(Menu* menu) {
MatrixModuleWidget::contextMenu(menu);
OptionsMenuItem* i = new OptionsMenuItem("Inverting");
+ i->addItem(OptionMenuItem("Disabled", [m]() { return m->_inverting == SwitchMatrixModule::NO_INVERTING; }, [m]() { m->setInverting(SwitchMatrixModule::NO_INVERTING); }));
i->addItem(OptionMenuItem("By param entry (right-click)", [m]() { return m->_inverting == SwitchMatrixModule::PARAM_INVERTING; }, [m]() { m->setInverting(SwitchMatrixModule::PARAM_INVERTING); }));
i->addItem(OptionMenuItem("On second click", [m]() { return m->_inverting == SwitchMatrixModule::CLICK_INVERTING; }, [m]() { m->setInverting(SwitchMatrixModule::CLICK_INVERTING); }));
- i->addItem(OptionMenuItem("Disabled", [m]() { return m->_inverting == SwitchMatrixModule::NO_INVERTING; }, [m]() { m->setInverting(SwitchMatrixModule::NO_INVERTING); }));
OptionsMenuItem::addToMenu(i, menu);
if (m->_ins > 1) {
std::string label("Exclusive switching");
if (m->_outs > 1) {
- label += " by row";
+ label += " by rows";
}
menu->addChild(new OptionMenuItem(label.c_str(), [m]() { return m->_columnExclusive; }, [m]() { m->setColumnExclusive(!m->_columnExclusive); }));
}
if (m->_outs > 1) {
std::string label("Exclusive switching");
if (m->_ins > 1) {
- label += " by column";
+ label += " by columns";
}
menu->addChild(new OptionMenuItem(label.c_str(), [m]() { return m->_rowExclusive; }, [m]() { m->setRowExclusive(!m->_rowExclusive); }));
}
diff --git a/src/matrix_base.hpp b/src/matrix_base.hpp
@@ -95,7 +95,7 @@ struct SwitchMatrixModule : MatrixModule {
NO_INVERTING
};
- Inverting _inverting = PARAM_INVERTING;
+ Inverting _inverting = NO_INVERTING;
bool _rowExclusive = false;
bool _columnExclusive = false;
std::vector<ParamQuantity*> _switchParamQuantities;