Skip to content

Commit 7243a18

Browse files
committed
Got transfer curve for split and non-split modes
1 parent ec206fe commit 7243a18

6 files changed

Lines changed: 167 additions & 28 deletions

File tree

include/private/meta/deesser.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ namespace lsp
8383
static constexpr float SPLIT_FREQ_DFL = 1000.0f;
8484
static constexpr float SPLIT_FREQ_STEP = 0.002f;
8585

86+
static constexpr float LINKING_MIN = 0;
87+
static constexpr float LINKING_MAX = 100.0f;
88+
static constexpr float LINKING_DFL = 100.0f;
89+
static constexpr float LINKING_STEP = 0.01f;
90+
8691
static constexpr size_t FFT_MESH_POINTS = 640;
8792
static constexpr size_t FFT_ANALYSIS_RANK = 13;
8893
static constexpr size_t FFT_ANALYSIS_ITEMS = 1 << FFT_ANALYSIS_RANK;

include/private/plugins/deesser.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ namespace lsp
156156

157157
float *vBuffer; // Buffer for data
158158

159+
float fLoGain; // Gain of the lower frequency band
160+
float fHiGain; // Gain of the higher frequency band
161+
159162
// Input ports
160163
plug::IPort *pIn; // Input port
161164
plug::IPort *pOut; // Output port
@@ -167,7 +170,10 @@ namespace lsp
167170
size_t nChannels; // Number of channels
168171
channel_t *vChannels; // Delay channels
169172
float *vBuffer; // Temporary buffer for audio processing
173+
174+
float fStereoLink; // Stereo linking
170175
bool bSidechain; // Sidechain version
176+
bool bStereoSplit; // Stereo split
171177

172178
dspu::DynamicFilters sFilters; // Dynamic filters
173179
dspu::Analyzer sAnalyzer; // Analyzer
@@ -180,6 +186,8 @@ namespace lsp
180186
plug::IPort *pBypass; // Bypass
181187
plug::IPort *pGainIn; // Input gain
182188
plug::IPort *pGainOut; // Output gain
189+
plug::IPort *pStereoSplit; // Stereo split
190+
plug::IPort *pStereoLink; // Stereo linking
183191

184192
uint8_t *pData; // Allocated data
185193

@@ -197,6 +205,7 @@ namespace lsp
197205
void bind_input_channels();
198206
void premix_channel(uint32_t channel, size_t count);
199207
void output_preeq_meshes();
208+
void output_xover_meshes();
200209

201210
public:
202211
explicit deesser(const meta::plugin_t *meta);

res/main/ui/plugins/dynamics/deesser.xml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,31 +94,54 @@
9494
id="sceq"
9595
xi="0" yi="3" width="2"
9696
color="graph_mesh_cycle" color.hue="0.0" color.a="0.3" smooth="true"
97-
fill="true" fcolor="graph_mesh_cycle" fcolor.hue="0.0" fcolor.a="0.9"
97+
fcolor="graph_mesh_cycle" fcolor.hue="0.0" fcolor.a="0.9" fill="true"
9898
visibility=":hpf_s igt 0" />
9999
<mesh
100100
id="sceq"
101101
xi="0" yi="1" width="2"
102102
color="graph_mesh_cycle" color.hue="0.25" color.a="0.3" smooth="true"
103-
fill="true" fcolor="graph_mesh_cycle" fcolor.hue="0.25" fcolor.a="0.9"
103+
fcolor="graph_mesh_cycle" fcolor.hue="0.25" fcolor.a="0.9" fill="true"
104104
visibility=":pk1_on" />
105105
<mesh
106106
id="sceq"
107107
xi="0" yi="2" width="2"
108108
color="graph_mesh_cycle" color.hue="0.5" color.a="0.3" smooth="true"
109-
fill="true" fcolor="graph_mesh_cycle" fcolor.hue="0.5" fcolor.a="0.9"
109+
fcolor="graph_mesh_cycle" fcolor.hue="0.5" fcolor.a="0.9" fill="true"
110110
visibility=":pk2_on" />
111111
<mesh
112112
id="sceq"
113113
xi="0" yi="4" width="2"
114114
color="graph_mesh_cycle" color.hue="0.75" color.a="0.3" smooth="true"
115-
fill="true" fcolor="graph_mesh_cycle" fcolor.hue="0.75" fcolor.a="0.9"
115+
fcolor="graph_mesh_cycle" fcolor.hue="0.75" fcolor.a="0.9" fill="true"
116116
visibility=":lpf_s igt 0" />
117117
<mesh
118118
id="sceq"
119119
xi="0" yi="5" width="3"
120120
color="bright_cyan" smooth="true" />
121121

122+
<!-- Crossover Meshes -->
123+
<mesh
124+
id="rgain"
125+
xi="0" yi="1" width="3"
126+
color="bright_cyan" smooth="true"
127+
fcolor="bright_cyan" fcolor.a="0.9" fill="true"
128+
visibility="(${mono}) or (!:ssplit)" />
129+
130+
<ui:if test=":stereo">
131+
<mesh
132+
id="rgain"
133+
xi="0" yi="1" width="3"
134+
color="left" smooth="true"
135+
fcolor="left" fcolor.a="0.9" fill="true"
136+
visibility=":ssplit" />
137+
<mesh
138+
id="rgain"
139+
xi="0" yi="2" width="3"
140+
color="right" smooth="true"
141+
fcolor="right" fcolor.a="0.9" fill="true"
142+
visibility=":ssplit" />
143+
</ui:if>
144+
122145
<!-- TODO: Meshes -->
123146

124147
<!-- Axis -->
@@ -220,7 +243,13 @@
220243

221244
<void bg.color="bg" vexpand="false" fill="false" pad.v="2"/>
222245
<hbox spacing="4" vexpand="false" bg.color="bg_schema" pad.h="6">
246+
<label text="labels.split"/>
247+
<combo id="split" pad.r="8" pad.v="4"/>
248+
<combo id="slope" pad.r="8" pad.v="4" activity=":split igt 0" />
223249
<void hexpand="true"/>
250+
<ui:if test=":stereo">
251+
<button id="ssplit" text="labels.stereo_split" size="22" ui:inject="Button_blue" pad.h="2"/>
252+
</ui:if>
224253
<vsep pad.h="2" bg.color="bg" reduce="true"/>
225254
<shmlink id="link" pad.l="2"/>
226255
</hbox>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
require_once("deesser.php");
3+
?>

src/main/meta/deesser.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,21 @@ namespace lsp
121121
IN_GAIN, \
122122
OUT_GAIN, \
123123
SWITCH("showsc", "Show sidechain overlay", "Show SC bar", 0.0f), \
124-
LOG_CONTROL("zoom", "Graph zoom", "Zoom", U_GAIN_AMP, deesser::ZOOM)
124+
LOG_CONTROL("zoom", "Graph zoom", "Zoom", U_GAIN_AMP, deesser::ZOOM), \
125+
LOG_CONTROL("slink", "Stereo linking", "Stereo link", U_PERCENT, deesser::LINKING)
126+
127+
#define DE_COMMON_MONO \
128+
DE_COMMON
129+
130+
#define DE_COMMON_STEREO \
131+
DE_COMMON, \
132+
SWITCH("ssplit", "Stereo split", "Stereo split", 0.0f)
125133

126134
static const port_t deesser_mono_ports[] =
127135
{
128136
PORTS_MONO_PLUGIN,
129137
DE_SHM_LINK_MONO,
130-
DE_COMMON,
138+
DE_COMMON_MONO,
131139
DE_PREMIX,
132140
DE_ANALYSIS(1),
133141
DE_CROSSOVER(1),
@@ -140,7 +148,7 @@ namespace lsp
140148
{
141149
PORTS_STEREO_PLUGIN,
142150
DE_SHM_LINK_STEREO,
143-
DE_COMMON,
151+
DE_COMMON_STEREO,
144152
DE_PREMIX,
145153
DE_ANALYSIS(2),
146154
DE_CROSSOVER(2),
@@ -154,7 +162,7 @@ namespace lsp
154162
PORTS_MONO_PLUGIN,
155163
PORTS_MONO_SIDECHAIN,
156164
DE_SHM_LINK_MONO,
157-
DE_COMMON,
165+
DE_COMMON_MONO,
158166
DE_SC_PREMIX,
159167
DE_ANALYSIS(1),
160168
DE_CROSSOVER(1),
@@ -168,7 +176,7 @@ namespace lsp
168176
PORTS_STEREO_PLUGIN,
169177
PORTS_STEREO_SIDECHAIN,
170178
DE_SHM_LINK_STEREO,
171-
DE_COMMON,
179+
DE_COMMON_STEREO,
172180
DE_SC_PREMIX,
173181
DE_ANALYSIS(2),
174182
DE_CROSSOVER(2),

0 commit comments

Comments
 (0)