Skip to content

Commit 3e2d496

Browse files
committed
Some changes related to metadata
1 parent 7ef0c5d commit 3e2d496

File tree

7 files changed

+119
-96
lines changed

7 files changed

+119
-96
lines changed

.cproject

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
</tool>
159159
</fileInfo>
160160
<sourceEntries>
161-
<entry excluding="modules/lsp-tk-lib/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-plugins-shared/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-3rd-party/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp|modules/lsp-dsp-units/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-ws-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
161+
<entry excluding="modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-ws-lib/src/test/main.cpp|modules/lsp-tk-lib/src/test/main.cpp|modules/lsp-dsp-units/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp|modules/lsp-plugins-shared/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-3rd-party/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
162162
</sourceEntries>
163163
</configuration>
164164
</storageModule>
@@ -252,7 +252,7 @@
252252
</tool>
253253
</fileInfo>
254254
<sourceEntries>
255-
<entry excluding="modules/lsp-tk-lib/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-plugins-shared/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-3rd-party/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp|modules/lsp-dsp-units/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-ws-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
255+
<entry excluding="modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-ws-lib/src/test/main.cpp|modules/lsp-tk-lib/src/test/main.cpp|modules/lsp-dsp-units/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp|modules/lsp-plugins-shared/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-3rd-party/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
256256
</sourceEntries>
257257
</configuration>
258258
</storageModule>
@@ -405,7 +405,7 @@
405405
</tool>
406406
</fileInfo>
407407
<sourceEntries>
408-
<entry excluding="modules/lsp-tk-lib/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-plugins-shared/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-3rd-party/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp|modules/lsp-dsp-units/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-ws-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
408+
<entry excluding="modules/lsp-dsp-lib/src/test/main.cpp|modules/lsp-test-fw/src/test/main.cpp|modules/lsp-r3d-base-lib/src/test/main.cpp|modules/lsp-runtime-lib/src/test/main.cpp|modules/lsp-ws-lib/src/test/main.cpp|modules/lsp-tk-lib/src/test/main.cpp|modules/lsp-dsp-units/src/test/main.cpp|modules/lsp-r3d-glx-lib/src/test/main.cpp|modules/lsp-common-lib/src/test/main.cpp|modules/lsp-plugins-shared/src/test/main.cpp|modules/lsp-lltl-lib/src/test/main.cpp|modules/lsp-3rd-party/src/test/main.cpp|modules/lsp-r3d-iface/src/test/main.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
409409
</sourceEntries>
410410
</configuration>
411411
</storageModule>

include/private/meta/matcher.h

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,29 @@ namespace lsp
3333
{
3434
typedef struct matcher
3535
{
36-
static constexpr float SAMPLES_MIN = 0.0f;
37-
static constexpr float SAMPLES_MAX = 10000.0f;
38-
static constexpr float SAMPLES_DFL = 0.0f;
39-
static constexpr float SAMPLES_STEP = 1.0f;
36+
static constexpr size_t FFT_RANK_MIN = 8;
37+
static constexpr size_t FFT_RANK_MAX = 14;
38+
static constexpr size_t FFT_RANK_IDX_DFL = 4;
4039

41-
static constexpr float TIME_MIN = 0.0f;
42-
static constexpr float TIME_MAX = 1000.0f;
43-
static constexpr float TIME_DFL = 0.0f;
44-
static constexpr float TIME_STEP = 0.01f;
40+
static constexpr float PROFILE_REACT_TIME_MIN = 0.100f;
41+
static constexpr float PROFILE_REACT_TIME_MAX = 10.000f;
42+
static constexpr float PROFILE_REACT_TIME_DFL = 1.000f;
43+
static constexpr float PROFILE_REACT_TIME_STEP = 0.01f;
4544

46-
static constexpr float DELAY_OUT_MAX_TIME = 10000.0f;
45+
static constexpr float BAND_AMP_GAIN_MIN = 0.0f;
46+
static constexpr float BAND_AMP_GAIN_MAX = 36.0f;
47+
static constexpr float BAND_AMP_GAIN_DFL = 12.0f;
48+
static constexpr float BAND_AMP_GAIN_STEP = 0.05f;
49+
50+
static constexpr float BAND_RED_GAIN_MIN = 0.0f;
51+
static constexpr float BAND_RED_GAIN_MAX = 36.0f;
52+
static constexpr float BAND_RED_GAIN_DFL = 12.0f;
53+
static constexpr float BAND_RED_GAIN_STEP = 0.05f;
54+
55+
static constexpr float BAND_REACT_MIN = 0.5f;
56+
static constexpr float BAND_REACT_MAX = 10.0f;
57+
static constexpr float BAND_REACT_DFL = 1.0f;
58+
static constexpr float BAND_REACT_STEP = 0.05f;
4759
} matcher;
4860

4961
// Plugin type metadata

res/main/i18n/default/bundles.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"matcher": {
33
"name": "Matcher",
4-
"description": "This plugins performs static and dynamic spectral matching of the audio signal according to the spectrum of the reference signal"
4+
"description": "This plugins performs static and dynamic spectral matching of the audio signal\naccording to the spectrum of the reference signal"
55
}
66
}
77

res/main/i18n/us/bundles.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"matcher": {
33
"name": "Matcher",
4-
"description": "This plugins performs static and dynamic spectral matching of the audio signal according to the spectrum of the reference signal"
4+
"description": "This plugins performs static and dynamic spectral matching of the audio signal\naccording to the spectrum of the reference signal"
55
}
66
}
77

res/main/ui/equalizer/matcher.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<plugin resizable="true">
2+
<grid rows="7" cols="5" spacing="4">
3+
4+
</grid>
5+
</plugin>

res/main/ui/template/plugin.xml

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/main/meta/matcher.cpp

Lines changed: 88 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,106 @@ namespace lsp
4040
{
4141
//-------------------------------------------------------------------------
4242
// Plugin metadata
43+
static const port_item_t matcher_fft_ranks[] =
44+
{
45+
{ "256", NULL },
46+
{ "512", NULL },
47+
{ "1024", NULL },
48+
{ "2048", NULL },
49+
{ "4096", NULL },
50+
{ "8192", NULL },
51+
{ "16384", NULL },
52+
{ NULL, NULL }
53+
};
4354

44-
static const port_t matcher_mono_ports[] =
55+
static const port_item_t matcher_references[] =
4556
{
46-
PORTS_MONO_PLUGIN,
47-
BYPASS,
57+
{ "Capture", "matcher.ref.capture" },
58+
{ "File", "matcher.ref.file" },
59+
{ "Sidechain", "matcher.ref.sidechain" },
60+
{ "Link", "matcher.ref.link" },
61+
{ NULL, NULL }
62+
};
4863

49-
PORTS_END
64+
static const port_item_t sc_matcher_references[] =
65+
{
66+
{ "Capture", "matcher.ref.capture" },
67+
{ "File", "matcher.ref.file" },
68+
{ "Sidechain", "matcher.ref.sidechain" },
69+
{ "Link", "matcher.ref.link" },
70+
{ NULL, NULL }
5071
};
5172

52-
static const port_t sc_matcher_mono_ports[] =
73+
static const port_item_t matcher_capture_source[] =
74+
{
75+
{ "In", "matcher.capture.in" },
76+
{ "Link", "matcher.capture.link" },
77+
{ NULL, NULL }
78+
};
79+
80+
static const port_item_t sc_matcher_capture_source[] =
81+
{
82+
{ "In", "matcher.capture.in" },
83+
{ "Sidehcain", "matcher.capture.sidechain" },
84+
{ "Link", "matcher.capture.link" },
85+
{ NULL, NULL }
86+
};
87+
88+
89+
#define MATCHER_COMMON(sources, captures, cap_default) \
90+
BYPASS, \
91+
AMP_GAIN100("input", "Input gain", "Input gain", 1.0f), \
92+
COMBO("fft", "FFT size", "FFT size", matcher::FFT_RANK_IDX_DFL, matcher_fft_ranks), \
93+
SWITCH("profile", "Profile", "Profile", 1.0f), \
94+
LOG_CONTROL("p_react", "Profile reactivity", "Prof react", U_SEC, matcher::PROFILE_REACT_TIME), \
95+
PERCENTS("slink", "Stereo link", "Stereo link", 100.0f, 0.1f), \
96+
COMBO("refer", "Reference source", "Reference", 0, sources), \
97+
SWITCH("capture", "Capture", "Capture", 0.0f), \
98+
SWITCH("listen", "Listen Capture", "Listen", 1.0f), \
99+
COMBO("cap_src", "Capture source", "Capture Src", cap_default, captures)
100+
101+
#define MATCHER_EQ_BAND(id, freq) \
102+
CONTROL("amp_" #id, "Amplification " freq "Hz", "Amp " freq "Hz", U_DB, matcher::BAND_AMP_GAIN), \
103+
CONTROL("rej_" #id, "Reduction " freq "Hz", "Red " freq "Hz", U_DB, matcher::BAND_RED_GAIN), \
104+
CONTROL("spd_" #id, "Reactivity " freq "Hz", "Red " freq "Hz", U_DB, matcher::BAND_REACT)
105+
106+
#define MATCHER_EQ \
107+
TRIGGER("match", "Perform immediate match", "Match"), \
108+
MATCHER_EQ_BAND(0, "25"), \
109+
MATCHER_EQ_BAND(1, "50"), \
110+
MATCHER_EQ_BAND(2, "107"), \
111+
MATCHER_EQ_BAND(3, "227"), \
112+
MATCHER_EQ_BAND(4, "484"), \
113+
MATCHER_EQ_BAND(5, "1 k"), \
114+
MATCHER_EQ_BAND(6, "2.2 k"), \
115+
MATCHER_EQ_BAND(7, "4.7 k"), \
116+
MATCHER_EQ_BAND(8, "9 k"), \
117+
MATCHER_EQ_BAND(9, "16 k")
118+
119+
static const port_t matcher_mono_ports[] =
53120
{
54121
PORTS_MONO_PLUGIN,
55-
PORTS_MONO_SIDECHAIN,
56-
BYPASS,
122+
MATCHER_COMMON(matcher_references, matcher_capture_source, 0),
123+
MATCHER_EQ,
57124

58125
PORTS_END
59126
};
60127

61128
static const port_t matcher_stereo_ports[] =
62129
{
63130
PORTS_STEREO_PLUGIN,
64-
BYPASS,
131+
MATCHER_COMMON(matcher_references, matcher_capture_source, 0),
132+
MATCHER_EQ,
133+
134+
PORTS_END
135+
};
136+
137+
static const port_t sc_matcher_mono_ports[] =
138+
{
139+
PORTS_MONO_PLUGIN,
140+
PORTS_MONO_SIDECHAIN,
141+
MATCHER_COMMON(sc_matcher_references, sc_matcher_capture_source, 1),
142+
MATCHER_EQ,
65143

66144
PORTS_END
67145
};
@@ -70,7 +148,8 @@ namespace lsp
70148
{
71149
PORTS_STEREO_PLUGIN,
72150
PORTS_STEREO_SIDECHAIN,
73-
BYPASS,
151+
MATCHER_COMMON(sc_matcher_references, sc_matcher_capture_source, 1),
152+
MATCHER_EQ,
74153

75154
PORTS_END
76155
};

0 commit comments

Comments
 (0)