29 using Selection::Selection;
32 auto currentSettings = ((
CVInstrument*)getCurrentOutput())->getCV2Mode();
33 int index =
static_cast<int>(currentSettings);
37 this->setValue(index);
39 void writeCurrentValue()
override {
40 auto current_value = this->getValue();
41 if (current_value != 0) {
44 auto newSetting =
static_cast<CVMode
>(current_value);
46 ((
CVInstrument*)getCurrentOutput())->setCV2Mode(newSetting);
49 deluge::vector<std::string_view> getOptions(OptType optType)
override {
51 using enum l10n::String;
52 static auto o = l10n::getView(STRING_FOR_OFF);
53 static auto y = l10n::getView(STRING_FOR_PATCH_SOURCE_Y);
54 static auto a = l10n::getView(STRING_FOR_PATCH_SOURCE_AFTERTOUCH);
55 static auto v = l10n::getView(STRING_FOR_VELOCITY);
61 const auto type = getCurrentOutputType();
62 return (type == OutputType::CV && ((
CVInstrument*)getCurrentOutput())->getChannel() == both);