Skip to content

Commit a72f323

Browse files
committed
Added audio pre-mixing controls
1 parent 26cdac9 commit a72f323

File tree

9 files changed

+438
-76
lines changed

9 files changed

+438
-76
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*******************************************************************************
44

55
=== 1.0.15 ===
6-
6+
* Added audio pre-mixing controls.
77

88
=== 1.0.14 ===
99
* Updated build scripts and dependencies.

include/private/plugins/gott_compressor.h

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,32 @@ namespace lsp
8080
SCT_LINK
8181
};
8282

83+
typedef struct premix_t
84+
{
85+
float fInToSc; // Input -> Sidechain mix
86+
float fInToLink; // Input -> Link mix
87+
float fLinkToIn; // Link -> Input mix
88+
float fLinkToSc; // Link -> Sidechain mix
89+
float fScToIn; // Sidechain -> Input mix
90+
float fScToLink; // Sidechain -> Link mix
91+
92+
float *vIn[2]; // Input buffer
93+
float *vOut[2]; // Output buffer
94+
float *vSc[2]; // Sidechain buffer
95+
float *vLink[2]; // Link buffer
96+
97+
float *vTmpIn[2]; // Replacement buffer for input
98+
float *vTmpLink[2]; // Replacement buffer for link
99+
float *vTmpSc[2]; // Replacement buffer for sidechain
100+
101+
plug::IPort *pInToSc; // Input -> Sidechain mix
102+
plug::IPort *pInToLink; // Input -> Link mix
103+
plug::IPort *pLinkToIn; // Link -> Input mix
104+
plug::IPort *pLinkToSc; // Link -> Sidechain mix
105+
plug::IPort *pScToIn; // Sidechain -> Input mix
106+
plug::IPort *pScToLink; // Sidechain -> Link mix
107+
} premix_t;
108+
83109
typedef struct band_t
84110
{
85111
dspu::Sidechain sSC; // Sidechain module
@@ -180,6 +206,7 @@ namespace lsp
180206
dspu::Sidechain sProtSC; // Surge protector sidechain module
181207
dspu::SurgeProtector sProt; // Surge protector
182208
dspu::Counter sCounter; // Sync counter
209+
premix_t sPremix; // Premix
183210

184211
uint32_t nMode; // Processor mode
185212
uint32_t nBands; // Number of bands
@@ -198,7 +225,6 @@ namespace lsp
198225
float vSplits[meta::gott_compressor::BANDS_MAX - 1]; // Split frequencies
199226
channel_t *vChannels; // Processor channels
200227
float *vAnalyze[4]; // Analysis buffer
201-
float *vEmptyBuf; // Empty buffer
202228
float *vBuffer; // Temporary buffer
203229
float *vProtBuffer; // Surge protection buffer
204230
const float *vSCIn[2]; // Sidechain input buffers
@@ -245,6 +271,7 @@ namespace lsp
245271
protected:
246272
uint32_t decode_sidechain_type(uint32_t sc) const;
247273
void process_sidechain(size_t samples);
274+
void update_premix();
248275
void do_destroy();
249276

250277
public:

res/main/ui/dynamics/gott_compressor/lr.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<plugin resizable="true">
2+
<ui:eval id="is_sidechain" value="(ex :sc) or (ex :sc_l) or (ex :sc_r)"/>
23
<ui:set id="has_solo" value="
34
(:bs_1l or :bs_2l or :bs_3l or (:ebe and :bs_4l)) or
45
(:bs_1r or :bs_2r or :bs_3r or (:ebe and :bs_4r))"/>
@@ -339,6 +340,7 @@
339340
<combo id="mode" pad.r="8" pad.v="4"/>
340341
<label text="labels.sc_boost:"/>
341342
<combo id="envb" pad.r="8"/>
343+
<button ui:id="premix_trigger" id="showpmx" text="labels.premix" size="22" />
342344
<button id="flt" text="labels.filters" size="22" ui:inject="Button_cyan"/>
343345
<void hexpand="true"/>
344346
<vsep pad.h="2" bg.color="bg" reduce="true"/>
@@ -744,4 +746,43 @@
744746
</cell>
745747
</grid>
746748
</vbox>
749+
750+
<!-- Premix overlay -->
751+
<overlay id="showpmx" trigger="premix_trigger" hpos="1" vpos="1" halign="-1" valign="1" ipadding.t="4">
752+
<group text="groups.premix" vexpand="false" ipadding="0">
753+
<grid rows="3" cols="${(:is_sidechain) ? 8 : 5}" spacing="0" bg.color="bg_schema" transpose="true">
754+
<ui:if test=":is_sidechain">
755+
<label text="labels.premix.in_to_sc" pad.h="6" pad.v="4" />
756+
<knob id="in2sc" />
757+
<value id="in2sc" pad.h="6" pad.v="4" />
758+
</ui:if>
759+
760+
<label text="labels.premix.in_to_link" pad.h="6" pad.v="4" />
761+
<knob id="in2lk" />
762+
<value id="in2lk" />
763+
764+
<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
765+
766+
<ui:if test=":is_sidechain">
767+
<label text="labels.premix.sc_to_in" pad.h="6" pad.v="4" />
768+
<knob id="sc2in" />
769+
<value id="sc2in" pad.h="6" pad.v="4" />
770+
771+
<label text="labels.premix.sc_to_link" pad.h="6" pad.v="4" />
772+
<knob id="sc2lk" />
773+
<value id="sc2lk" pad.h="6" pad.v="4" />
774+
775+
<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
776+
</ui:if>
777+
778+
<label text="labels.premix.link_to_in" pad.h="6" pad.v="4" />
779+
<knob id="lk2in" />
780+
<value id="lk2in" pad.h="6" pad.v="4" />
781+
782+
<label text="labels.premix.link_to_sc" pad.h="6" pad.v="4" />
783+
<knob id="lk2sc" />
784+
<value id="lk2sc" pad.h="6" pad.v="4" />
785+
</grid>
786+
</group>
787+
</overlay>
747788
</plugin>

res/main/ui/dynamics/gott_compressor/mono.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<plugin resizable="true">
2+
<ui:eval id="is_sidechain" value="(ex :sc) or (ex :sc_l) or (ex :sc_r)"/>
23
<ui:set id="has_solo" value="
34
:bs_1 or :bs_2 or :bs_3 or (:ebe and :bs_4)"/>
45

@@ -311,6 +312,7 @@
311312
<combo id="mode" pad.r="8" pad.v="4"/>
312313
<label text="labels.sc_boost:"/>
313314
<combo id="envb" pad.r="8"/>
315+
<button ui:id="premix_trigger" id="showpmx" text="labels.premix" size="22" />
314316
<button id="flt" text="labels.filters" size="22" ui:inject="Button_cyan"/>
315317
<void hexpand="true"/>
316318
<vsep pad.h="2" bg.color="bg" reduce="true"/>
@@ -707,4 +709,43 @@
707709
</cell>
708710
</grid>
709711
</vbox>
712+
713+
<!-- Premix overlay -->
714+
<overlay id="showpmx" trigger="premix_trigger" hpos="1" vpos="1" halign="-1" valign="1" ipadding.t="4">
715+
<group text="groups.premix" vexpand="false" ipadding="0">
716+
<grid rows="3" cols="${(:is_sidechain) ? 8 : 5}" spacing="0" bg.color="bg_schema" transpose="true">
717+
<ui:if test=":is_sidechain">
718+
<label text="labels.premix.in_to_sc" pad.h="6" pad.v="4" />
719+
<knob id="in2sc" />
720+
<value id="in2sc" pad.h="6" pad.v="4" />
721+
</ui:if>
722+
723+
<label text="labels.premix.in_to_link" pad.h="6" pad.v="4" />
724+
<knob id="in2lk" />
725+
<value id="in2lk" />
726+
727+
<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
728+
729+
<ui:if test=":is_sidechain">
730+
<label text="labels.premix.sc_to_in" pad.h="6" pad.v="4" />
731+
<knob id="sc2in" />
732+
<value id="sc2in" pad.h="6" pad.v="4" />
733+
734+
<label text="labels.premix.sc_to_link" pad.h="6" pad.v="4" />
735+
<knob id="sc2lk" />
736+
<value id="sc2lk" pad.h="6" pad.v="4" />
737+
738+
<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
739+
</ui:if>
740+
741+
<label text="labels.premix.link_to_in" pad.h="6" pad.v="4" />
742+
<knob id="lk2in" />
743+
<value id="lk2in" pad.h="6" pad.v="4" />
744+
745+
<label text="labels.premix.link_to_sc" pad.h="6" pad.v="4" />
746+
<knob id="lk2sc" />
747+
<value id="lk2sc" pad.h="6" pad.v="4" />
748+
</grid>
749+
</group>
750+
</overlay>
710751
</plugin>

res/main/ui/dynamics/gott_compressor/ms.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<plugin resizable="true">
2+
<ui:eval id="is_sidechain" value="(ex :sc) or (ex :sc_l) or (ex :sc_r)"/>
23
<ui:set id="has_solo" value="
34
(:bs_1m or :bs_2m or :bs_3m or (:ebe and :bs_4m)) or
45
(:bs_1s or :bs_2s or :bs_3s or (:ebe and :bs_4s))"/>
@@ -339,6 +340,7 @@
339340
<combo id="mode" pad.r="8" pad.v="4"/>
340341
<label text="labels.sc_boost:"/>
341342
<combo id="envb" pad.r="8"/>
343+
<button ui:id="premix_trigger" id="showpmx" text="labels.premix" size="22" />
342344
<button id="flt" text="labels.filters" size="22" ui:inject="Button_cyan"/>
343345
<void hexpand="true"/>
344346
<vsep pad.h="2" bg.color="bg" reduce="true"/>
@@ -744,4 +746,43 @@
744746
</cell>
745747
</grid>
746748
</vbox>
749+
750+
<!-- Premix overlay -->
751+
<overlay id="showpmx" trigger="premix_trigger" hpos="1" vpos="1" halign="-1" valign="1" ipadding.t="4">
752+
<group text="groups.premix" vexpand="false" ipadding="0">
753+
<grid rows="3" cols="${(:is_sidechain) ? 8 : 5}" spacing="0" bg.color="bg_schema" transpose="true">
754+
<ui:if test=":is_sidechain">
755+
<label text="labels.premix.in_to_sc" pad.h="6" pad.v="4" />
756+
<knob id="in2sc" />
757+
<value id="in2sc" pad.h="6" pad.v="4" />
758+
</ui:if>
759+
760+
<label text="labels.premix.in_to_link" pad.h="6" pad.v="4" />
761+
<knob id="in2lk" />
762+
<value id="in2lk" />
763+
764+
<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
765+
766+
<ui:if test=":is_sidechain">
767+
<label text="labels.premix.sc_to_in" pad.h="6" pad.v="4" />
768+
<knob id="sc2in" />
769+
<value id="sc2in" pad.h="6" pad.v="4" />
770+
771+
<label text="labels.premix.sc_to_link" pad.h="6" pad.v="4" />
772+
<knob id="sc2lk" />
773+
<value id="sc2lk" pad.h="6" pad.v="4" />
774+
775+
<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
776+
</ui:if>
777+
778+
<label text="labels.premix.link_to_in" pad.h="6" pad.v="4" />
779+
<knob id="lk2in" />
780+
<value id="lk2in" pad.h="6" pad.v="4" />
781+
782+
<label text="labels.premix.link_to_sc" pad.h="6" pad.v="4" />
783+
<knob id="lk2sc" />
784+
<value id="lk2sc" pad.h="6" pad.v="4" />
785+
</grid>
786+
</group>
787+
</overlay>
747788
</plugin>

res/main/ui/dynamics/gott_compressor/stereo.xml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<plugin resizable="true">
2+
<ui:eval id="is_sidechain" value="(ex :sc) or (ex :sc_l) or (ex :sc_r)"/>
23
<ui:set id="has_solo" value="
34
:bs_1 or :bs_2 or :bs_3 or (:ebe and :bs_4)"/>
45

@@ -323,6 +324,7 @@
323324
<combo id="mode" pad.r="8" pad.v="4"/>
324325
<label text="labels.sc_boost:"/>
325326
<combo id="envb" pad.r="8"/>
327+
<button ui:id="premix_trigger" id="showpmx" text="labels.premix" size="22" />
326328
<button id="flt" text="labels.filters" size="22" ui:inject="Button_cyan"/>
327329
<void hexpand="true"/>
328330
<button id="ssplit" text="labels.stereo_split" size="22" ui:inject="Button_blue" pad.r="2"/>
@@ -724,4 +726,43 @@
724726
</cell>
725727
</grid>
726728
</vbox>
729+
730+
<!-- Premix overlay -->
731+
<overlay id="showpmx" trigger="premix_trigger" hpos="1" vpos="1" halign="-1" valign="1" ipadding.t="4">
732+
<group text="groups.premix" vexpand="false" ipadding="0">
733+
<grid rows="3" cols="${(:is_sidechain) ? 8 : 5}" spacing="0" bg.color="bg_schema" transpose="true">
734+
<ui:if test=":is_sidechain">
735+
<label text="labels.premix.in_to_sc" pad.h="6" pad.v="4" />
736+
<knob id="in2sc" />
737+
<value id="in2sc" pad.h="6" pad.v="4" />
738+
</ui:if>
739+
740+
<label text="labels.premix.in_to_link" pad.h="6" pad.v="4" />
741+
<knob id="in2lk" />
742+
<value id="in2lk" />
743+
744+
<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
745+
746+
<ui:if test=":is_sidechain">
747+
<label text="labels.premix.sc_to_in" pad.h="6" pad.v="4" />
748+
<knob id="sc2in" />
749+
<value id="sc2in" pad.h="6" pad.v="4" />
750+
751+
<label text="labels.premix.sc_to_link" pad.h="6" pad.v="4" />
752+
<knob id="sc2lk" />
753+
<value id="sc2lk" pad.h="6" pad.v="4" />
754+
755+
<cell rows="3"><vsep pad.h="2" bg.color="bg" reduce="true" /></cell>
756+
</ui:if>
757+
758+
<label text="labels.premix.link_to_in" pad.h="6" pad.v="4" />
759+
<knob id="lk2in" />
760+
<value id="lk2in" pad.h="6" pad.v="4" />
761+
762+
<label text="labels.premix.link_to_sc" pad.h="6" pad.v="4" />
763+
<knob id="lk2sc" />
764+
<value id="lk2sc" pad.h="6" pad.v="4" />
765+
</grid>
766+
</group>
767+
</overlay>
727768
</plugin>

src/doc/manuals/plugins/gott_compressor.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
<li><b>Shift</b> - allows to adjust the overall gain of the analysis.</li>
9696
<li><b>FFT<?= $sm ?> In</b> - enables FFT curve graph of input signal on the spectrum graph.</li>
9797
<li><b>FFT<?= $sm ?> Out</b> - enables FFT curve graph of output signal on the spectrum graph.</li>
98+
<li><b>Pre-mix</b> - shows pre-mix control overlay.</li>
9899
<li><b>Filters</b> - enables drawing tranfer function of each sidechain filter on the spectrum graph.</li>
99100
<li><b>Surge</b> - enables surge protection mechanism.</li>
100101
</ul>
@@ -157,5 +158,17 @@
157158
<li><b>Compression curve</b> - the compression curve graph and the gain reduction meter.</li>
158159
</ul>
159160

160-
161+
<p><b>Pre-mix control overlay:</b></p>
162+
<ul>
163+
<?php if ($sc) { ?>
164+
<li><b>In -> SC</b> - the amount of signal from input channel added to the Sidechain.</li>
165+
<?php } ?>
166+
<li><b>In -> Link</b> - the amount of signal from input channel added to the shared memory link.</li>
167+
<?php if ($sc) { ?>
168+
<li><b>SC -> In</b> - the amount of signal from sidechain input channel added to the input channel.</li>
169+
<li><b>SC -> Link</b> - the amount of signal from sidechain input channel added to the shared memory link.</li>
170+
<?php } ?>
171+
<li><b>Link -> In</b> - the amount of signal from shared memory link added to the input channel.</li>
172+
<li><b>Link -> SC</b> - the amount of signal from shared memory link added to the sidechain channel.</li>
173+
</ul>
161174

0 commit comments

Comments
 (0)