Skip to content

Commit

Permalink
Added 2 more envelopes (#3279)
Browse files Browse the repository at this point in the history
* Added 2 envelopes

Co-authored-by: Raúl Muñoz <[email protected]>

* Correct PR number

---------

Co-authored-by: Nikodemus Siivola <[email protected]>
  • Loading branch information
soymonitus and nikodemus authored Jan 13, 2025
1 parent 4f43b9f commit 9b843d9
Show file tree
Hide file tree
Showing 16 changed files with 146 additions and 23 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Made grain much faster and updated controls
- Added LPF to Mutable Instruments Reverb
- Added an option to reverse the stutter effect
- Added two more envelopes (Envelope 3 and Envelope 4), which you can access from the sound editor menu.

### User Interface

Expand Down
8 changes: 7 additions & 1 deletion docs/community_features.md
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ to each individual note onset. ([#1978])

- ([#1198] [#2978] [#2985] [#2990] [#3062] [#3079]) For a detailed description of this feature, please refer to the feature
documentation: [Arpeggiator Documentation]

#### 4.3.9 - Velocity View

- For a detailed description of this feature as well the button shortcuts/combos, please refer to the feature documentation: [Velocity View Documentation]
Expand Down Expand Up @@ -1082,6 +1082,10 @@ as an oscillator type within the subtractive engine, so it can be combined with

- As the UI and implementation is still experimental, a community setting has to be activated to create new DX7 patches. See the separate document for details.

#### 4.5.8 - More envelopes

- ([#3279]) Added two more envelopes (Envelope 3 and Envelope 4), which you can access from the sound editor menu.

### 4.6 - Instrument Clip View - Kit Clip Features

#### 4.6.1 - Keyboard View
Expand Down Expand Up @@ -1572,6 +1576,8 @@ different firmware

[#3079]: https://github.com/SynthstromAudible/DelugeFirmware/pull/3079

[#3279]: https://github.com/SynthstromAudible/DelugeFirmware/pull/3279

[Automation View Documentation]: features/automation_view.md

[Arpeggiator Documentation]: features/arpeggiator.md
Expand Down
4 changes: 3 additions & 1 deletion src/definitions_cxx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ constexpr int32_t kFlangerMinTime = (3 << 16);
constexpr int32_t kFlangerAmplitude = (kModFXMaxDelay - kFlangerMinTime);
constexpr int32_t kFlangerOffset = ((kModFXMaxDelay + kFlangerMinTime) >> 1);

constexpr int32_t kNumEnvelopes = 2;
constexpr int32_t kNumEnvelopes = 4;
constexpr int32_t kNumLFOs = 2;
constexpr int32_t kNumModulators = 2;

Expand Down Expand Up @@ -307,6 +307,8 @@ enum class PatchSource : uint8_t {
SIDECHAIN,
ENVELOPE_0,
ENVELOPE_1,
ENVELOPE_2,
ENVELOPE_3,
LFO_LOCAL,
X,
Y,
Expand Down
14 changes: 14 additions & 0 deletions src/deluge/gui/l10n/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"STRING_FOR_PATCH_SOURCE_LFO_LOCAL": "LFO2",
"STRING_FOR_PATCH_SOURCE_ENVELOPE_0": "Envelope 1",
"STRING_FOR_PATCH_SOURCE_ENVELOPE_1": "Envelope 2",
"STRING_FOR_PATCH_SOURCE_ENVELOPE_2": "Envelope 3",
"STRING_FOR_PATCH_SOURCE_ENVELOPE_3": "Envelope 4",
"STRING_FOR_PATCH_SOURCE_VELOCITY": "Velocity",
"STRING_FOR_PATCH_SOURCE_NOTE": "Note",
"STRING_FOR_PATCH_SOURCE_SIDECHAIN": "Sidechain",
Expand Down Expand Up @@ -91,6 +93,16 @@
"STRING_FOR_PARAM_LOCAL_ENV_1_SUSTAIN": "Env2 sustain",
"STRING_FOR_PARAM_LOCAL_ENV_1_RELEASE": "Env2 release",

"STRING_FOR_PARAM_LOCAL_ENV_2_ATTACK": "Env3 attack",
"STRING_FOR_PARAM_LOCAL_ENV_2_DECAY": "Env3 decay",
"STRING_FOR_PARAM_LOCAL_ENV_2_SUSTAIN": "Env3 sustain",
"STRING_FOR_PARAM_LOCAL_ENV_2_RELEASE": "Env3 release",

"STRING_FOR_PARAM_LOCAL_ENV_3_ATTACK": "Env4 attack",
"STRING_FOR_PARAM_LOCAL_ENV_3_DECAY": "Env4 decay",
"STRING_FOR_PARAM_LOCAL_ENV_3_SUSTAIN": "Env4 sustain",
"STRING_FOR_PARAM_LOCAL_ENV_3_RELEASE": "Env4 release",

"STRING_FOR_PARAM_GLOBAL_LFO_FREQ": "LFO1 rate",
"STRING_FOR_PARAM_LOCAL_LFO_LOCAL_FREQ": "LFO2 rate",

Expand Down Expand Up @@ -392,6 +404,8 @@
"STRING_FOR_DEV_MENU_G": "Dev Menu G",
"STRING_FOR_ENVELOPE_1": "Envelope 1",
"STRING_FOR_ENVELOPE_2": "Envelope 2",
"STRING_FOR_ENVELOPE_3": "Envelope 3",
"STRING_FOR_ENVELOPE_4": "Envelope 4",
"STRING_FOR_VOLUME_LEVEL": "Volume",
"STRING_FOR_AMOUNT_LEVEL": "Level",
"STRING_FOR_REPEAT_MODE": "Repeat mode",
Expand Down
12 changes: 12 additions & 0 deletions src/deluge/gui/l10n/g_english.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_PATCH_SOURCE_LFO_LOCAL, "LFO2"},
{STRING_FOR_PATCH_SOURCE_ENVELOPE_0, "Envelope 1"},
{STRING_FOR_PATCH_SOURCE_ENVELOPE_1, "Envelope 2"},
{STRING_FOR_PATCH_SOURCE_ENVELOPE_2, "Envelope 3"},
{STRING_FOR_PATCH_SOURCE_ENVELOPE_3, "Envelope 4"},
{STRING_FOR_PATCH_SOURCE_VELOCITY, "Velocity"},
{STRING_FOR_PATCH_SOURCE_NOTE, "Note"},
{STRING_FOR_PATCH_SOURCE_SIDECHAIN, "Sidechain"},
Expand Down Expand Up @@ -89,6 +91,14 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_PARAM_LOCAL_ENV_1_DECAY, "Env2 decay"},
{STRING_FOR_PARAM_LOCAL_ENV_1_SUSTAIN, "Env2 sustain"},
{STRING_FOR_PARAM_LOCAL_ENV_1_RELEASE, "Env2 release"},
{STRING_FOR_PARAM_LOCAL_ENV_2_ATTACK, "Env3 attack"},
{STRING_FOR_PARAM_LOCAL_ENV_2_DECAY, "Env3 decay"},
{STRING_FOR_PARAM_LOCAL_ENV_2_SUSTAIN, "Env3 sustain"},
{STRING_FOR_PARAM_LOCAL_ENV_2_RELEASE, "Env3 release"},
{STRING_FOR_PARAM_LOCAL_ENV_3_ATTACK, "Env4 attack"},
{STRING_FOR_PARAM_LOCAL_ENV_3_DECAY, "Env4 decay"},
{STRING_FOR_PARAM_LOCAL_ENV_3_SUSTAIN, "Env4 sustain"},
{STRING_FOR_PARAM_LOCAL_ENV_3_RELEASE, "Env4 release"},
{STRING_FOR_PARAM_GLOBAL_LFO_FREQ, "LFO1 rate"},
{STRING_FOR_PARAM_LOCAL_LFO_LOCAL_FREQ, "LFO2 rate"},
{STRING_FOR_PARAM_GLOBAL_MOD_FX_DEPTH, "Mod-FX depth"},
Expand Down Expand Up @@ -352,6 +362,8 @@ PLACE_SDRAM_DATA Language english{
{STRING_FOR_DEV_MENU_G, "Dev Menu G"},
{STRING_FOR_ENVELOPE_1, "Envelope 1"},
{STRING_FOR_ENVELOPE_2, "Envelope 2"},
{STRING_FOR_ENVELOPE_3, "Envelope 3"},
{STRING_FOR_ENVELOPE_4, "Envelope 4"},
{STRING_FOR_VOLUME_LEVEL, "Volume"},
{STRING_FOR_AMOUNT_LEVEL, "Level"},
{STRING_FOR_REPEAT_MODE, "Repeat mode"},
Expand Down
2 changes: 2 additions & 0 deletions src/deluge/gui/l10n/g_seven_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ PLACE_SDRAM_DATA Language seven_segment{
{STRING_FOR_PATCH_SOURCE_LFO_LOCAL, "LFO2"},
{STRING_FOR_PATCH_SOURCE_ENVELOPE_0, "ENV1"},
{STRING_FOR_PATCH_SOURCE_ENVELOPE_1, "ENV2"},
{STRING_FOR_PATCH_SOURCE_ENVELOPE_2, "ENV3"},
{STRING_FOR_PATCH_SOURCE_ENVELOPE_3, "ENV4"},
{STRING_FOR_PATCH_SOURCE_VELOCITY, "VELOCITY"},
{STRING_FOR_PATCH_SOURCE_NOTE, "NOTE"},
{STRING_FOR_PATCH_SOURCE_SIDECHAIN, "SIDE"},
Expand Down
2 changes: 2 additions & 0 deletions src/deluge/gui/l10n/seven_segment.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"STRING_FOR_PATCH_SOURCE_LFO_LOCAL": "LFO2",
"STRING_FOR_PATCH_SOURCE_ENVELOPE_0": "ENV1",
"STRING_FOR_PATCH_SOURCE_ENVELOPE_1": "ENV2",
"STRING_FOR_PATCH_SOURCE_ENVELOPE_2": "ENV3",
"STRING_FOR_PATCH_SOURCE_ENVELOPE_3": "ENV4",
"STRING_FOR_PATCH_SOURCE_VELOCITY": "VELOCITY",
"STRING_FOR_PATCH_SOURCE_NOTE": "NOTE",
"STRING_FOR_PATCH_SOURCE_SIDECHAIN": "SIDE",
Expand Down
12 changes: 12 additions & 0 deletions src/deluge/gui/l10n/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ enum class String : size_t {
STRING_FOR_PATCH_SOURCE_LFO_LOCAL,
STRING_FOR_PATCH_SOURCE_ENVELOPE_0,
STRING_FOR_PATCH_SOURCE_ENVELOPE_1,
STRING_FOR_PATCH_SOURCE_ENVELOPE_2,
STRING_FOR_PATCH_SOURCE_ENVELOPE_3,
STRING_FOR_PATCH_SOURCE_VELOCITY,
STRING_FOR_PATCH_SOURCE_NOTE,
STRING_FOR_PATCH_SOURCE_SIDECHAIN,
Expand Down Expand Up @@ -78,6 +80,14 @@ enum class String : size_t {
STRING_FOR_PARAM_LOCAL_ENV_1_DECAY,
STRING_FOR_PARAM_LOCAL_ENV_1_SUSTAIN,
STRING_FOR_PARAM_LOCAL_ENV_1_RELEASE,
STRING_FOR_PARAM_LOCAL_ENV_2_ATTACK,
STRING_FOR_PARAM_LOCAL_ENV_2_DECAY,
STRING_FOR_PARAM_LOCAL_ENV_2_SUSTAIN,
STRING_FOR_PARAM_LOCAL_ENV_2_RELEASE,
STRING_FOR_PARAM_LOCAL_ENV_3_ATTACK,
STRING_FOR_PARAM_LOCAL_ENV_3_DECAY,
STRING_FOR_PARAM_LOCAL_ENV_3_SUSTAIN,
STRING_FOR_PARAM_LOCAL_ENV_3_RELEASE,
STRING_FOR_PARAM_GLOBAL_LFO_FREQ,
STRING_FOR_PARAM_GLOBAL_VOLUME_POST_FX,
STRING_FOR_PARAM_GLOBAL_VOLUME_POST_REVERB_SEND,
Expand Down Expand Up @@ -376,6 +386,8 @@ enum class String : size_t {
STRING_FOR_DEV_MENU_G,
STRING_FOR_ENVELOPE_1,
STRING_FOR_ENVELOPE_2,
STRING_FOR_ENVELOPE_3,
STRING_FOR_ENVELOPE_4,
STRING_FOR_VOLUME_LEVEL,
STRING_FOR_AMOUNT_LEVEL,
STRING_FOR_REPEAT_MODE,
Expand Down
2 changes: 1 addition & 1 deletion src/deluge/gui/menu_item/generate/dmenus/envelopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@
[attack, decay, sustain, release],
name=f"STRING_FOR_ENVELOPE_{i+1}",
)
for i in range(2)
for i in range(4)
]
2 changes: 2 additions & 0 deletions src/deluge/gui/menu_item/generate/g_menus.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ std::array<MenuItem*, 4> child5 = {
};
submenu::Envelope env0Menu{STRING_FOR_ENVELOPE_1, child5, 0};
submenu::Envelope env1Menu{STRING_FOR_ENVELOPE_2, child5, 1};
submenu::Envelope env2Menu{STRING_FOR_ENVELOPE_3, child5, 2};
submenu::Envelope env3Menu{STRING_FOR_ENVELOPE_4, child5, 3};
osc::Type oscTypeMenu{STRING_FOR_TYPE, STRING_FOR_OSC_TYPE_MENU_TITLE};
osc::source::Volume sourceVolumeMenu{STRING_FOR_VOLUME_LEVEL, STRING_FOR_OSC_LEVEL_MENU_TITLE, params::LOCAL_OSC_A_VOLUME};
osc::source::WaveIndex sourceWaveIndexMenu{STRING_FOR_WAVE_INDEX, STRING_FOR_OSC_WAVE_IND_MENU_TITLE, params::LOCAL_OSC_A_WAVE_INDEX};
Expand Down
15 changes: 12 additions & 3 deletions src/deluge/gui/menu_item/source_selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@

namespace deluge::gui::menu_item {
const PatchSource sourceMenuContents[] = {
PatchSource::ENVELOPE_0, PatchSource::ENVELOPE_1, PatchSource::LFO_GLOBAL, PatchSource::LFO_LOCAL,
PatchSource::VELOCITY, PatchSource::NOTE, PatchSource::SIDECHAIN, PatchSource::RANDOM,
PatchSource::X, PatchSource::Y, PatchSource::AFTERTOUCH,
PatchSource::ENVELOPE_0, PatchSource::ENVELOPE_1, PatchSource::ENVELOPE_2, PatchSource::ENVELOPE_3,
PatchSource::LFO_GLOBAL, PatchSource::LFO_LOCAL, PatchSource::VELOCITY, PatchSource::NOTE,
PatchSource::SIDECHAIN, PatchSource::RANDOM, PatchSource::X, PatchSource::Y,
PatchSource::AFTERTOUCH,
};

uint8_t SourceSelection::shouldDrawDotOnValue() {
Expand Down Expand Up @@ -96,6 +97,14 @@ void SourceSelection::drawValue() {
text = STRING_FOR_PATCH_SOURCE_ENVELOPE_1;
break;

case PatchSource::ENVELOPE_2:
text = STRING_FOR_PATCH_SOURCE_ENVELOPE_2;
break;

case PatchSource::ENVELOPE_3:
text = STRING_FOR_PATCH_SOURCE_ENVELOPE_3;
break;

case PatchSource::SIDECHAIN:
text = STRING_FOR_PATCH_SOURCE_SIDECHAIN;
break;
Expand Down
2 changes: 2 additions & 0 deletions src/deluge/gui/ui/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,8 @@ menu_item::Submenu soundEditorRootMenu{
&modulator1Menu,
&env0Menu,
&env1Menu,
&env2Menu,
&env3Menu,
&lfo1Menu,
&lfo2Menu,
&voiceMenu,
Expand Down
49 changes: 39 additions & 10 deletions src/deluge/modulation/params/param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "gui/l10n/l10n.h"
#include "gui/l10n/strings.h"
#include "model/settings/runtime_feature_settings.h"
#include "util/container/enum_to_string_map.hpp"
#include <cstring>

namespace deluge::modulation::params {
Expand Down Expand Up @@ -131,6 +132,8 @@ char const* getPatchedParamShortName(ParamType type) {
[LOCAL_HPF_RESONANCE] = "HPF reso",
[LOCAL_ENV_0_SUSTAIN] = "Env1 sus",
[LOCAL_ENV_1_SUSTAIN] = "Env2 sus",
[LOCAL_ENV_2_SUSTAIN] = "Env3 sus",
[LOCAL_ENV_3_SUSTAIN] = "Env4 sus",
[LOCAL_LPF_MORPH] = "LPF Morph",
[LOCAL_HPF_MORPH] = "HPF Morph",
[LOCAL_OSC_A_PHASE_WIDTH] = "Osc1 PW",
Expand All @@ -148,10 +151,16 @@ char const* getPatchedParamShortName(ParamType type) {
[LOCAL_LFO_LOCAL_FREQ] = "LFO2 rate",
[LOCAL_ENV_0_ATTACK] = "Env1attack",
[LOCAL_ENV_1_ATTACK] = "Env2attack",
[LOCAL_ENV_2_ATTACK] = "Env3attack",
[LOCAL_ENV_3_ATTACK] = "Env4attack",
[LOCAL_ENV_0_DECAY] = "Env1 decay",
[LOCAL_ENV_1_DECAY] = "Env2 decay",
[LOCAL_ENV_2_DECAY] = "Env3 decay",
[LOCAL_ENV_3_DECAY] = "Env4 decay",
[LOCAL_ENV_0_RELEASE] = "Env1 rel",
[LOCAL_ENV_1_RELEASE] = "Env2 rel",
[LOCAL_ENV_2_RELEASE] = "Env3 rel",
[LOCAL_ENV_3_RELEASE] = "Env4 rel",
[GLOBAL_VOLUME_POST_FX] = "POSTFXLVL",
[GLOBAL_VOLUME_POST_REVERB_SEND] = "Side level",
[GLOBAL_REVERB_AMOUNT] = "Reverb amt",
Expand Down Expand Up @@ -192,6 +201,8 @@ char const* getPatchedParamDisplayName(int32_t p) {
[LOCAL_HPF_RESONANCE] = STRING_FOR_PARAM_LOCAL_HPF_RESONANCE,
[LOCAL_ENV_0_SUSTAIN] = STRING_FOR_PARAM_LOCAL_ENV_0_SUSTAIN,
[LOCAL_ENV_1_SUSTAIN] = STRING_FOR_PARAM_LOCAL_ENV_1_SUSTAIN,
[LOCAL_ENV_2_SUSTAIN] = STRING_FOR_PARAM_LOCAL_ENV_2_SUSTAIN,
[LOCAL_ENV_3_SUSTAIN] = STRING_FOR_PARAM_LOCAL_ENV_3_SUSTAIN,
[LOCAL_LPF_MORPH] = STRING_FOR_PARAM_LOCAL_LPF_MORPH,
[LOCAL_HPF_MORPH] = STRING_FOR_PARAM_LOCAL_HPF_MORPH,
[LOCAL_OSC_A_PHASE_WIDTH] = STRING_FOR_PARAM_LOCAL_OSC_A_PHASE_WIDTH,
Expand All @@ -209,10 +220,16 @@ char const* getPatchedParamDisplayName(int32_t p) {
[LOCAL_LFO_LOCAL_FREQ] = STRING_FOR_PARAM_LOCAL_LFO_LOCAL_FREQ,
[LOCAL_ENV_0_ATTACK] = STRING_FOR_PARAM_LOCAL_ENV_0_ATTACK,
[LOCAL_ENV_1_ATTACK] = STRING_FOR_PARAM_LOCAL_ENV_1_ATTACK,
[LOCAL_ENV_2_ATTACK] = STRING_FOR_PARAM_LOCAL_ENV_2_ATTACK,
[LOCAL_ENV_3_ATTACK] = STRING_FOR_PARAM_LOCAL_ENV_3_ATTACK,
[LOCAL_ENV_0_DECAY] = STRING_FOR_PARAM_LOCAL_ENV_0_DECAY,
[LOCAL_ENV_1_DECAY] = STRING_FOR_PARAM_LOCAL_ENV_1_DECAY,
[LOCAL_ENV_2_DECAY] = STRING_FOR_PARAM_LOCAL_ENV_2_DECAY,
[LOCAL_ENV_3_DECAY] = STRING_FOR_PARAM_LOCAL_ENV_3_DECAY,
[LOCAL_ENV_0_RELEASE] = STRING_FOR_PARAM_LOCAL_ENV_0_RELEASE,
[LOCAL_ENV_1_RELEASE] = STRING_FOR_PARAM_LOCAL_ENV_1_RELEASE,
[LOCAL_ENV_2_RELEASE] = STRING_FOR_PARAM_LOCAL_ENV_2_RELEASE,
[LOCAL_ENV_3_RELEASE] = STRING_FOR_PARAM_LOCAL_ENV_3_RELEASE,
[GLOBAL_VOLUME_POST_FX] = STRING_FOR_PARAM_GLOBAL_VOLUME_POST_FX,
[GLOBAL_VOLUME_POST_REVERB_SEND] = STRING_FOR_PARAM_GLOBAL_VOLUME_POST_REVERB_SEND,
[GLOBAL_REVERB_AMOUNT] = STRING_FOR_PARAM_GLOBAL_REVERB_AMOUNT,
Expand Down Expand Up @@ -597,27 +614,39 @@ constexpr char const* paramNameForFileConst(Kind const kind, ParamType const par

case LOCAL_ENV_0_ATTACK:
return "env1Attack";

case LOCAL_ENV_0_DECAY:
return "env1Decay";

case LOCAL_ENV_0_SUSTAIN:
return "env1Sustain";

case LOCAL_ENV_0_RELEASE:
return "env1Release";

case LOCAL_ENV_1_ATTACK:
return "env2Attack";
case LOCAL_ENV_2_ATTACK:
return "env3Attack";
case LOCAL_ENV_3_ATTACK:
return "env4Attack";

case LOCAL_ENV_0_DECAY:
return "env1Decay";
case LOCAL_ENV_1_DECAY:
return "env2Decay";
case LOCAL_ENV_2_DECAY:
return "env3Decay";
case LOCAL_ENV_3_DECAY:
return "env4Decay";

case LOCAL_ENV_0_SUSTAIN:
return "env1Sustain";
case LOCAL_ENV_1_SUSTAIN:
return "env2Sustain";
case LOCAL_ENV_2_SUSTAIN:
return "env3Sustain";
case LOCAL_ENV_3_SUSTAIN:
return "env4Sustain";

case LOCAL_ENV_0_RELEASE:
return "env1Release";
case LOCAL_ENV_1_RELEASE:
return "env2Release";
case LOCAL_ENV_2_RELEASE:
return "env3Release";
case LOCAL_ENV_3_RELEASE:
return "env4Release";

case LOCAL_MODULATOR_0_FEEDBACK:
return "modulator1Feedback";
Expand Down
8 changes: 8 additions & 0 deletions src/deluge/modulation/params/param.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ enum Local : ParamType {
LOCAL_HPF_RESONANCE,
LOCAL_ENV_0_SUSTAIN,
LOCAL_ENV_1_SUSTAIN,
LOCAL_ENV_2_SUSTAIN,
LOCAL_ENV_3_SUSTAIN,
LOCAL_LPF_MORPH,
LOCAL_HPF_MORPH,

Expand All @@ -106,10 +108,16 @@ enum Local : ParamType {
LOCAL_LFO_LOCAL_FREQ,
LOCAL_ENV_0_ATTACK,
LOCAL_ENV_1_ATTACK,
LOCAL_ENV_2_ATTACK,
LOCAL_ENV_3_ATTACK,
LOCAL_ENV_0_DECAY,
LOCAL_ENV_1_DECAY,
LOCAL_ENV_2_DECAY,
LOCAL_ENV_3_DECAY,
LOCAL_ENV_0_RELEASE,
LOCAL_ENV_1_RELEASE,
LOCAL_ENV_2_RELEASE,
LOCAL_ENV_3_RELEASE,

/// Special value used to chain in to the Global params.
LOCAL_LAST,
Expand Down
10 changes: 5 additions & 5 deletions src/deluge/processing/sound/sound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1341,11 +1341,11 @@ PatchCableAcceptance Sound::maySourcePatchToParam(PatchSource s, uint8_t p, Para
return PatchCableAcceptance::DISALLOWED;

case params::LOCAL_VOLUME:
return (s != PatchSource::ENVELOPE_0
// No envelopes allowed to be patched to volume - this is hardcoded elsewhere
&& s != PatchSource::ENVELOPE_1
// Don't let the sidechain patch to local volume - it's supposed to go to global volume
&& s != PatchSource::SIDECHAIN)
return (
// No envelopes allowed to be patched to volume - this is hardcoded elsewhere
(s < PatchSource::ENVELOPE_0 || PatchSource::ENVELOPE_3 < s)
// Don't let the sidechain patch to local volume - it's supposed to go to global volume
&& s != PatchSource::SIDECHAIN)
? PatchCableAcceptance::ALLOWED
: PatchCableAcceptance::DISALLOWED;

Expand Down
Loading

0 comments on commit 9b843d9

Please sign in to comment.