Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup dx7 when dx oscillator selected #3004

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/deluge/gui/menu_item/osc/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Type final : public Selection, public FormattedTitle {
Type(l10n::String name, l10n::String title_format_str) : Selection(name), FormattedTitle(title_format_str){};
void beginSession(MenuItem* navigatedBackwardFrom) override { Selection::beginSession(navigatedBackwardFrom); }

bool mayUseDx() { return soundEditor.currentSource->dxPatch != nullptr; }
bool mayUseDx() { return !soundEditor.editingKit(); }

void readCurrentValue() override {
int32_t rawVal = (int32_t)soundEditor.currentSource->oscType;
Expand Down Expand Up @@ -67,6 +67,7 @@ class Type final : public Selection, public FormattedTitle {
}

soundEditor.currentSource->setOscType(newValue);

if (oldValue == OscType::SQUARE || newValue == OscType::SQUARE) {
soundEditor.currentSound->setupPatchingForAllParamManagers(currentSong);
}
Expand Down
3 changes: 3 additions & 0 deletions src/deluge/processing/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ void Source::setOscType(OscType newType) {
}

oscType = newType;
if (oscType == OscType::DX7) {
ensureDxPatch();
}
}

DxPatch* Source::ensureDxPatch() {
Expand Down
Loading