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

A few M-S Tool naming tweaks #5177

Merged
merged 1 commit into from
Sep 30, 2021
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<single-fx streaming_version="17">
<snapshot name="MS Decode(-6dB)"
<snapshot name="M-S Decode (-6 dB)"
type="26"
p0="2"
p1="-60"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<single-fx streaming_version="17">
<snapshot name="MS Decode"
<snapshot name="M-S Decode"
type="26"
p0="2"
p1="-60"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<single-fx streaming_version="17">
<snapshot name="MS EQ"
<snapshot name="M-S EQ"
type="26"
p0="0"
p1="-60"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<single-fx streaming_version="17">
<snapshot name="MS Encode"
<snapshot name="M-S Encode"
type="26"
p0="1"
p1="-60"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<single-fx streaming_version="17">
<snapshot name="Tight Bass"
<snapshot name="Tight Bass"
type="26"
p0="0"
p1="-60"
Expand Down
10 changes: 5 additions & 5 deletions resources/surge-shared/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
<type i="16" name="Graphic EQ">
<snapshot name="Init" p0="0" p1="0" p2="0" p3="0" p4="0" p5="0" p6="0" p7="0" p8="0" p9="0" p10="0" p11="0"/>
</type>
<type i="26" name="MS Tool">
<snapshot name="Init" p0="0" p1="-60" p1_deactivated="1" p2="0" p2_deactivated="1" p3="-6.63049" p4="70"
p4_deactivated="1" p5="-60" p5_deactivated="1" p6="0" p6_deactivated="1" p7="50.2131" p8="70"
p8_deactivated="1" p9="0" p10="0" p11="0"/>
</type>
<type i="17" name="Resonator">
<snapshot name="Init" p0="-18.6305" p1="0.75" p2="0.793701" p3="8.03822" p4="0.75" p5="0.793701" p6="35.9013"
p7="0.75" p8="0.793701" p9="1" p10="0" p11="1"/>
Expand Down Expand Up @@ -149,6 +144,11 @@
<snapshot name="Init" p0="0.000000" p1="0.000000" p2="1.000000" p3="0.000000" p4="-17.014269" p5="0.000000"
p6="0.000000" p7="0.000000"/>
</type>
<type i="26" name="Mid-Side Tool">
<snapshot name="Init" p0="0" p1="-60" p1_deactivated="1" p2="0" p2_deactivated="1" p3="-6.63049" p4="70"
p4_deactivated="1" p5="-60" p5_deactivated="1" p6="0" p6_deactivated="1" p7="50.2131" p8="70"
p8_deactivated="1" p9="0" p10="0" p11="0"/>
</type>
</fx>
<customctrl>
<entry p="0" ctrl="41"/>
Expand Down
22 changes: 19 additions & 3 deletions src/common/Parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ bool Parameter::is_bipolar() const
case ct_freq_mod:
case ct_percent_bipolar:
case ct_percent_bipolar_stereo:
case ct_percent_bipolar_pan:
case ct_percent_bipolar_w_dynamic_unipolar_formatting:
case ct_twist_aux_mix:
case ct_freq_shift:
Expand Down Expand Up @@ -992,6 +993,7 @@ void Parameter::set_type(int ctrltype)
case ct_modern_trimix:
case ct_percent_bipolar:
case ct_percent_bipolar_stereo:
case ct_percent_bipolar_pan:
case ct_percent_bipolar_stringbal:
case ct_percent_bipolar_w_dynamic_unipolar_formatting:
case ct_twist_aux_mix:
Expand Down Expand Up @@ -1313,6 +1315,18 @@ void Parameter::set_type(int ctrltype)
snprintf(displayInfo.maxLabel, DISPLAYINFO_TXT_SIZE, "100.00 %% (Right)");
displayInfo.scale = 100;
break;
case ct_percent_bipolar_pan:
displayType = LinearWithScale;
displayInfo.customFeatures = ParamDisplayFeatures::kHasCustomMinString |
ParamDisplayFeatures::kHasCustomMaxString |
ParamDisplayFeatures::kHasCustomDefaultString;

snprintf(displayInfo.unit, DISPLAYINFO_TXT_SIZE, "%%");
snprintf(displayInfo.minLabel, DISPLAYINFO_TXT_SIZE, "-100.00 %% (Left)");
snprintf(displayInfo.defLabel, DISPLAYINFO_TXT_SIZE, "0.00 %% (Center)");
snprintf(displayInfo.maxLabel, DISPLAYINFO_TXT_SIZE, "100.00 %% (Right)");
displayInfo.scale = 100;
break;
case ct_percent_bipolar_stringbal:
displayType = LinearWithScale;
displayInfo.customFeatures = ParamDisplayFeatures::kHasCustomMinString |
Expand Down Expand Up @@ -1580,6 +1594,7 @@ void Parameter::bound_value(bool force_integer)
case ct_percent200:
case ct_percent_bipolar:
case ct_percent_bipolar_stereo:
case ct_percent_bipolar_pan:
case ct_percent_bipolar_stringbal:
case ct_percent_bipolar_w_dynamic_unipolar_formatting:
case ct_twist_aux_mix:
Expand Down Expand Up @@ -3419,13 +3434,13 @@ void Parameter::get_display(char *txt, bool external, float ef) const
switch (i)
{
case 0:
snprintf(txt, TXT_SIZE, "LR -> MS -> LR");
snprintf(txt, TXT_SIZE, "L-R > M-S > L-R");
break;
case 1:
snprintf(txt, TXT_SIZE, "LR -> MS");
snprintf(txt, TXT_SIZE, "L-R > M-S");
break;
case 2:
snprintf(txt, TXT_SIZE, "MS -> LR");
snprintf(txt, TXT_SIZE, "M-S > L-R");
break;
}
break;
Expand Down Expand Up @@ -3811,6 +3826,7 @@ bool Parameter::can_setvalue_from_string() const
case ct_percent200:
case ct_percent_bipolar:
case ct_percent_bipolar_stereo:
case ct_percent_bipolar_pan:
case ct_percent_bipolar_stringbal:
case ct_percent_bipolar_w_dynamic_unipolar_formatting:
case ct_twist_aux_mix:
Expand Down
1 change: 1 addition & 0 deletions src/common/Parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ enum ctrltypes
ct_tape_speed,
ct_lfophaseshuffle,
ct_mscodec,
ct_percent_bipolar_pan, // bipolar with special text strings at -100% +100% and 0%
num_ctrltypes,
};

Expand Down
2 changes: 1 addition & 1 deletion src/common/SurgePatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ SurgePatch::SurgePatch(SurgeStorage *storage)
a->push_back(scene[sc].volume.assign(p_id.next(), id_s++, "volume", "Volume",
ct_amplitude_clipper, Surge::Skin::Scene::volume,
sc_id, cg_GLOBAL, 0, true, sceasy));
a->push_back(scene[sc].pan.assign(p_id.next(), id_s++, "pan", "Pan", ct_percent_bipolar,
a->push_back(scene[sc].pan.assign(p_id.next(), id_s++, "pan", "Pan", ct_percent_bipolar_pan,
Surge::Skin::Scene::pan, sc_id, cg_GLOBAL, 0, true,
sceasy));
a->push_back(scene[sc].width.assign(p_id.next(), id_s++, "pan2", "Width",
Expand Down
12 changes: 6 additions & 6 deletions src/common/SurgeStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,16 @@ enum fx_type
};

const char fx_type_names[n_fx_types][16] = {
"Off", "Delay", "Reverb 1", "Phaser", "Rotary", "Distortion",
"EQ", "Freq Shift", "Conditioner", "Chorus", "Vocoder", "Reverb 2",
"Flanger", "Ring Mod", "Airwindows", "Neuron", "Graphic EQ", "Resonator",
"CHOW", "Exciter", "Ensemble", "Combulator", "Nimbus", "Tape",
"Treemonster", "Waveshaper", "MS Tool"};
"Off", "Delay", "Reverb 1", "Phaser", "Rotary", "Distortion",
"EQ", "Freq Shift", "Conditioner", "Chorus", "Vocoder", "Reverb 2",
"Flanger", "Ring Mod", "Airwindows", "Neuron", "Graphic EQ", "Resonator",
"CHOW", "Exciter", "Ensemble", "Combulator", "Nimbus", "Tape",
"Treemonster", "Waveshaper", "Mid-Side Tool"};

const char fx_type_shortnames[n_fx_types][8] = {"OFF", "DLY", "RV1", "PH", "ROT", "DIST", "EQ",
"FRQ", "DYN", "CH", "VOC", "RV2", "FL", "RM",
"AW", "NEU", "GEQ", "RES", "CHW", "XCT", "ENS",
"CMB", "NIM", "TAPE", "TM", "WS", "MS"};
"CMB", "NIM", "TAPE", "TM", "WS", "M-S"};

enum fx_bypass
{
Expand Down
4 changes: 2 additions & 2 deletions src/common/dsp/effects/CombulatorEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,10 @@ void CombulatorEffect::init_ctrltypes()
fxdata->p[combulator_gain3].posy_offset = 5;

fxdata->p[combulator_pan2].set_name("Pan 2");
fxdata->p[combulator_pan2].set_type(ct_percent_bipolar_stereo);
fxdata->p[combulator_pan2].set_type(ct_percent_bipolar_pan);
fxdata->p[combulator_pan2].posy_offset = 7;
fxdata->p[combulator_pan3].set_name("Pan 3");
fxdata->p[combulator_pan3].set_type(ct_percent_bipolar_stereo);
fxdata->p[combulator_pan3].set_type(ct_percent_bipolar_pan);
fxdata->p[combulator_pan3].posy_offset = 7;
fxdata->p[combulator_mix].set_name("Mix");
fxdata->p[combulator_mix].set_type(ct_percent);
Expand Down
30 changes: 15 additions & 15 deletions src/common/dsp/effects/MSToolEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ const char *MSToolEffect::group_label(int id)
switch (id)
{
case 0:
return "MS Options";
return " Options";
case 1:
return "Filter M";
return "Mid Filter";
case 2:
return "Filter S";
return "Side Filter";
case 3:
return "Output";
}
Expand Down Expand Up @@ -220,32 +220,32 @@ void MSToolEffect::init_ctrltypes()
fxdata->p[mstl_matrix].set_name("Matrix");
fxdata->p[mstl_matrix].set_type(ct_mscodec);

fxdata->p[mstl_hpm].set_name("HP M");
fxdata->p[mstl_hpm].set_name("Low Cut");
fxdata->p[mstl_hpm].set_type(ct_freq_audible_deactivatable);
fxdata->p[mstl_pqm].set_name("Peak M");
fxdata->p[mstl_pqm].set_name("Gain");
fxdata->p[mstl_pqm].set_type(ct_decibel_narrow_deactivatable);
fxdata->p[mstl_freqm].set_name("Freq M");
fxdata->p[mstl_freqm].set_name("Frequency");
fxdata->p[mstl_freqm].set_type(ct_freq_audible);
fxdata->p[mstl_freqm].dynamicDeactivation = &eqGroupDeact;
fxdata->p[mstl_lpm].set_name("LP M");
fxdata->p[mstl_lpm].set_name("High Cut");
fxdata->p[mstl_lpm].set_type(ct_freq_audible_deactivatable);

fxdata->p[mstl_hps].set_name("HP S");
fxdata->p[mstl_hps].set_name("Low Cut");
fxdata->p[mstl_hps].set_type(ct_freq_audible_deactivatable);
fxdata->p[mstl_pqs].set_name("Peak S");
fxdata->p[mstl_pqs].set_name("Gain");
fxdata->p[mstl_pqs].set_type(ct_decibel_narrow_deactivatable);
fxdata->p[mstl_freqs].set_name("Freq S");
fxdata->p[mstl_freqs].set_name("Frequency");
fxdata->p[mstl_freqs].set_type(ct_freq_audible);
fxdata->p[mstl_freqs].dynamicDeactivation = &eqGroupDeact;
fxdata->p[mstl_lps].set_name("LP S");
fxdata->p[mstl_lps].set_name("High Cut");
fxdata->p[mstl_lps].set_type(ct_freq_audible_deactivatable);

fxdata->p[mstl_mgain].set_name("Gain M");
fxdata->p[mstl_mgain].set_name("Mid Gain");
fxdata->p[mstl_mgain].set_type(ct_decibel_attenuation_plus12);
fxdata->p[mstl_sgain].set_name("Gain S");
fxdata->p[mstl_sgain].set_name("Side Gain");
fxdata->p[mstl_sgain].set_type(ct_decibel_attenuation_plus12);
fxdata->p[mstl_outgain].set_name("Balance L/R");
fxdata->p[mstl_outgain].set_type(ct_percent_bipolar);
fxdata->p[mstl_outgain].set_name("Balance");
fxdata->p[mstl_outgain].set_type(ct_percent_bipolar_stereo);

fxdata->p[mstl_matrix].posy_offset = 1;

Expand Down
2 changes: 1 addition & 1 deletion src/common/dsp/effects/MSToolEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MSToolEffect : public Effect
public:
MSToolEffect(SurgeStorage *storage, FxStorage *fxdata, pdata *pd);
virtual ~MSToolEffect();
virtual const char *get_effectname() override { return "MS Tool"; }
virtual const char *get_effectname() override { return "Mid-Side Tool"; }
virtual void init() override;
virtual void process(float *dataL, float *dataR) override;
virtual void suspend() override;
Expand Down