Skip to content

Commit c1ad022

Browse files
committed
Release 1.0.20
* Added Hold option to the dspu::Compressor module. * Added Hold option to the dspu::Expander module. * Added Hold option to the dspu::Gate module. * Added Hold option to the dspu::DynamicProcessor module. * Fixed RLC implementation of allpass filters. * Added support of LR2 (12 dB/oct) filters by the Crossover. * Updated build scripts. * Updated module versions in dependencies.
2 parents 56ec746 + d314b44 commit c1ad022

File tree

21 files changed

+1169
-370
lines changed

21 files changed

+1169
-370
lines changed

CHANGELOG

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 1.0.20 ===
6+
* Added Hold option to the dspu::Compressor module.
7+
* Added Hold option to the dspu::Expander module.
8+
* Added Hold option to the dspu::Gate module.
9+
* Added Hold option to the dspu::DynamicProcessor module.
10+
* Fixed RLC implementation of allpass filters.
11+
* Added support of LR2 (12 dB/oct) filters by the Crossover.
12+
* Updated build scripts.
13+
* Updated module versions in dependencies.
14+
515
=== 1.0.19 ===
616
* Refactoring and optimizations of the Expander module.
717
* Updated interface of the dspu::Sample, added gain function.

include/lsp-plug.in/dsp-units/ctl/Bypass.h

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2020 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-units
66
* Created on: 07 дек. 2015 г.
@@ -34,10 +34,6 @@ namespace lsp
3434
*/
3535
class LSP_DSP_UNITS_PUBLIC Bypass
3636
{
37-
private:
38-
Bypass & operator = (const Bypass &);
39-
Bypass(const Bypass &);
40-
4137
private:
4238
enum state_t
4339
{
@@ -52,8 +48,13 @@ namespace lsp
5248

5349
public:
5450
explicit Bypass();
51+
Bypass(const Bypass &) = delete;
52+
Bypass(Bypass &&) = delete;
5553
~Bypass();
5654

55+
Bypass & operator = (const Bypass &) = delete;
56+
Bypass & operator = (Bypass &&) = delete;
57+
5758
/**
5859
* Construct object
5960
*/
@@ -85,6 +86,20 @@ namespace lsp
8586
*/
8687
void process(float *dst, const float *dry, const float *wet, size_t count);
8788

89+
/**
90+
* Process the signal and apply gain to wet signal. If Bypass is on, then dry signal is passed to output.
91+
* If bypass is off, then wet signal is passed.
92+
* When bypass is in active state, the mix of dry and wet signal is passed to
93+
* output.
94+
*
95+
* @param dst output buffer
96+
* @param dry dry signal buffer
97+
* @param wet wet signal buffer
98+
* @param wet_gain additional gain to apply to wet signal
99+
* @param count number of samples to process
100+
*/
101+
void process_wet(float *dst, const float *dry, const float *wet, float wet_gain, size_t count);
102+
88103
/**
89104
* Enable/disable bypass
90105
* @param bypass bypass value
@@ -129,7 +144,7 @@ namespace lsp
129144
*/
130145
void dump(IStateDumper *v) const;
131146
};
132-
}
147+
} /* namespace dspu */
133148
} /* namespace lsp */
134149

135150
#endif /* LSP_PLUG_IN_DSP_UNITS_CTL_BYPASS_H_ */

include/lsp-plug.in/dsp-units/dynamics/Compressor.h

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/>
3-
* (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com>
2+
* Copyright (C) 2024 Linux Studio Plugins Project <https://lsp-plug.in/>
3+
* (C) 2024 Vladimir Sadovnikov <sadko4u@gmail.com>
44
*
55
* This file is part of lsp-dsp-units
66
* Created on: 16 сент. 2016 г.
@@ -55,16 +55,20 @@ namespace lsp
5555
float fRelease;
5656
float fKnee;
5757
float fRatio;
58+
float fHold;
5859
float fEnvelope;
60+
float fPeak;
5961

6062
// Pre-calculated parameters
6163
float fTauAttack;
6264
float fTauRelease;
6365
comp_t sComp; // Two compressor knees
6466

6567
// Additional parameters
66-
size_t nSampleRate;
67-
size_t nMode;
68+
uint32_t nHold;
69+
uint32_t nHoldCounter;
70+
uint32_t nSampleRate;
71+
uint32_t nMode;
6872
bool bUpdate;
6973

7074
public:
@@ -102,13 +106,43 @@ namespace lsp
102106
*/
103107
void update_settings();
104108

109+
/**
110+
* Get attack threshold of compressor
111+
* @return attack threshold of compressor
112+
*/
113+
inline float attack_threshold() const { return fAttackThresh; }
114+
115+
/**
116+
* Set attack threshold
117+
* @param threshold attack threshold
118+
*/
119+
void set_attack_threshold(float threshold);
120+
121+
/**
122+
* Get release threshold of compressor
123+
* @return release threshold of compressor
124+
*/
125+
inline float release_threshold() const { return fReleaseThresh; }
126+
127+
/**
128+
* Set release threshold
129+
* @param threshold release threshold
130+
*/
131+
void set_release_threshold(float threshold);
132+
105133
/** Set compressor threshold
106134
*
107135
* @param attack the attack threshold
108136
* @param release the release threshold (relative to attack, must be positive, less or equal to 1.0)
109137
*/
110138
void set_threshold(float attack, float release);
111139

140+
/**
141+
* Get boost threshold of compressor
142+
* @return boost threshold of compressor
143+
*/
144+
inline float boost_threshold() const { return fBoostThresh; }
145+
112146
/**
113147
* Set boost threshold, valid for upward compression only
114148
* @param boost boost threshold
@@ -122,30 +156,60 @@ namespace lsp
122156
*/
123157
void set_timings(float attack, float release);
124158

159+
/**
160+
* Get attack time
161+
* @return attack time (ms)
162+
*/
163+
inline float attack() const { return fAttack; }
164+
125165
/** Set attack time
126166
*
127167
* @param attack attack time (ms)
128168
*/
129169
void set_attack(float attack);
130170

171+
/**
172+
* Get release time of compressor
173+
* @return release time of compressor (ms)
174+
*/
175+
inline float release() const { return fRelease; }
176+
131177
/** Set release time
132178
*
133179
* @param release release time (ms)
134180
*/
135181
void set_release(float release);
136182

183+
/**
184+
* Get sample rate
185+
* @return sample rate
186+
*/
187+
inline size_t sample_rate() const { return nSampleRate; }
188+
137189
/** Set compressor's sample rate
138190
*
139191
* @param sr sample rate
140192
*/
141193
void set_sample_rate(size_t sr);
142194

195+
/**
196+
* Get compressor knee
197+
* @return compressor knee
198+
*/
199+
inline float knee() const { return fKnee; }
200+
143201
/** Set compressor's knee
144202
*
145203
* @param knee (in gain units)
146204
*/
147205
void set_knee(float knee);
148206

207+
/**
208+
* Get compression ratio
209+
* @return compression ratio
210+
*/
211+
inline float ratio() const { return fRatio; }
212+
149213
/** Set compression ratio
150214
*
151215
* @param ratio compression ratio
@@ -158,6 +222,20 @@ namespace lsp
158222
*/
159223
void set_mode(size_t mode);
160224

225+
inline size_t mode() const { return nMode; }
226+
227+
/**
228+
* Get the hold time of compressor
229+
* @return hold time of compressor
230+
*/
231+
float hold() const { return fHold; }
232+
233+
/**
234+
* Set hold time in milliseconds
235+
* @param hold hold time in milliseconds
236+
*/
237+
void set_hold(float hold);
238+
161239
/** Process sidechain signal
162240
*
163241
* @param out output signal gain to VCA

0 commit comments

Comments
 (0)