Skip to content

Commit

Permalink
Fix send levels 3/4 appearing to be voice modulatable (#5184)
Browse files Browse the repository at this point in the history
Closes #5183
  • Loading branch information
mkruselj authored Sep 30, 2021
1 parent 954c0bc commit 6ff5014
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 deletions.
47 changes: 21 additions & 26 deletions src/common/SurgePatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,13 @@ void SurgePatch::init_default_values()
scene[sc].fm_depth.val.f = -24.f;
scene[sc].portamento.val.f = scene[sc].portamento.val_min.f;
scene[sc].keytrack_root.val.i = 60;
scene[sc].send_level[0].val.f = scene[sc].send_level[0].val_min.f;
scene[sc].send_level[1].val.f = scene[sc].send_level[1].val_min.f;
scene[sc].send_level[0].per_voice_processing = false;
scene[sc].send_level[1].per_voice_processing = false;

for (int i = 0; i < n_send_slots; i++)
{
scene[sc].send_level[i].val.f = scene[sc].send_level[i].val_min.f;
scene[sc].send_level[i].per_voice_processing = false;
}

scene[sc].volume.val.f = 0.890899f;
scene[sc].width.val.f = 1.f; // width

Expand All @@ -696,28 +699,20 @@ void SurgePatch::init_default_values()
scene[sc].lowcut.deactivated = false;
scene[sc].lowcut.per_voice_processing = false;

scene[sc].adsr[0].a.val.f = scene[sc].adsr[0].a.val_min.f;
scene[sc].adsr[0].a.val_default.f = scene[sc].adsr[0].a.val_min.f;
scene[sc].adsr[0].d.val.f = -2;
scene[sc].adsr[0].d.val_default.f = -2;
scene[sc].adsr[0].r.val.f = -5;
scene[sc].adsr[0].r.val_default.f = -5;
scene[sc].adsr[0].s.val.f = 1;
scene[sc].adsr[0].s.val_default.f = 1;
scene[sc].adsr[0].a_s.val.i = 1;
scene[sc].adsr[0].d_s.val.i = 1;
scene[sc].adsr[0].r_s.val.i = 2;
scene[sc].adsr[1].a.val.f = scene[sc].adsr[1].a.val_min.f;
scene[sc].adsr[1].a.val_default.f = scene[sc].adsr[1].a.val_min.f;
scene[sc].adsr[1].d.val.f = -2;
scene[sc].adsr[1].d.val_default.f = -2;
scene[sc].adsr[1].s.val.f = 0;
scene[sc].adsr[1].s.val_default.f = 0;
scene[sc].adsr[1].r.val.f = -2;
scene[sc].adsr[1].r.val_default.f = -2;
scene[sc].adsr[1].a_s.val.i = 1;
scene[sc].adsr[1].d_s.val.i = 1;
scene[sc].adsr[1].r_s.val.i = 1;
for (int i = 0; i < n_egs; i++)
{
scene[sc].adsr[i].a.val.f = scene[sc].adsr[i].a.val_min.f;
scene[sc].adsr[i].a.val_default.f = scene[sc].adsr[i].a.val_min.f;
scene[sc].adsr[i].d.val.f = -2;
scene[sc].adsr[i].d.val_default.f = -2;
scene[sc].adsr[i].r.val.f = -5;
scene[sc].adsr[i].r.val_default.f = (i == 0) ? -5.f : 0.f;
scene[sc].adsr[i].s.val.f = 1;
scene[sc].adsr[i].s.val_default.f = 1;
scene[sc].adsr[i].a_s.val.i = 1;
scene[sc].adsr[i].d_s.val.i = 1;
scene[sc].adsr[i].r_s.val.i = 2;
}

for (int l = 0; l < n_lfos; l++)
{
Expand Down
1 change: 1 addition & 0 deletions src/common/SurgeStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const int n_lfos_voice = 6;
const int n_lfos_scene = 6;
const int n_lfos = n_lfos_voice + n_lfos_scene;
const int n_osc_params = 7;
const int n_egs = 2;
const int n_fx_params = 12;
const int n_fx_slots = 16;
const int n_send_slots = 4;
Expand Down

0 comments on commit 6ff5014

Please sign in to comment.