@@ -46,6 +46,18 @@ using minmax_t = control::minmax<NV,
46
46
template <int NV>
47
47
using minmax1_t = control::minmax<NV,
48
48
parameter::plain<project::Distortion<NV>, 0 >>;
49
+
50
+ template <int NV> using minmax2_t = minmax_t <NV>;
51
+
52
+ template <int NV>
53
+ using smoothed_parameter_unscaled_mod = parameter::chain<ranges::Identity,
54
+ parameter::plain<minmax_t <NV>, 0 >,
55
+ parameter::plain<minmax1_t <NV>, 0 >,
56
+ parameter::plain<minmax2_t <NV>, 0 >>;
57
+
58
+ template <int NV>
59
+ using smoothed_parameter_unscaled_t = wrap::mod<smoothed_parameter_unscaled_mod<NV>,
60
+ control::smoothed_parameter_unscaled<NV, smoothers::linear_ramp<NV>>>;
49
61
template <int NumVoices> struct snex_softsat
50
62
{
51
63
SNEX_NODE (snex_softsat);
@@ -122,7 +134,8 @@ using snex_shaper_t = wrap::no_data<core::snex_shaper<snex_softsat<NV>>>;
122
134
template <int NV>
123
135
using chain_t = container::chain<parameter::empty,
124
136
wrap::fix<2 , core::gain<NV>>,
125
- snex_shaper_t <NV>>;
137
+ snex_shaper_t <NV>,
138
+ core::gain<NV>>;
126
139
template <int NV>
127
140
using branch_t = container::branch<parameter::empty,
128
141
wrap::fix<2 , chain_t <NV>>,
@@ -132,7 +145,9 @@ template <int NV>
132
145
using wet_path_t = container::chain<parameter::empty,
133
146
wrap::fix<2 , filters::one_pole<NV>>,
134
147
filters::one_pole<NV>,
148
+ smoothed_parameter_unscaled_t <NV>,
135
149
minmax_t <NV>,
150
+ minmax2_t <NV>,
136
151
minmax1_t <NV>,
137
152
branch_t <NV>,
138
153
filters::one_pole<NV>,
@@ -152,16 +167,14 @@ namespace Waveshaper_t_parameters
152
167
{
153
168
// Parameter list for Waveshaper_impl::Waveshaper_t ------------------------------------------------
154
169
155
- template <int NV>
156
- using Amount = parameter::chain<ranges::Identity,
157
- parameter::plain<Waveshaper_impl::minmax_t <NV>, 0 >,
158
- parameter::plain<Waveshaper_impl::minmax1_t <NV>, 0 >>;
159
-
160
170
using Distort = parameter::empty;
161
171
template <int NV>
162
172
using Mix = parameter::plain<Waveshaper_impl::dry_wet1_t <NV>,
163
173
0 >;
164
174
template <int NV>
175
+ using Amount = parameter::plain<Waveshaper_impl::smoothed_parameter_unscaled_t <NV>,
176
+ 0 >;
177
+ template <int NV>
165
178
using Gain = parameter::plain<project::Distortion<NV>,
166
179
1 >;
167
180
template <int NV>
@@ -210,9 +223,9 @@ template <int NV> struct instance: public Waveshaper_impl::Waveshaper_t_<NV>
210
223
0x5B00 , 0x0001 , 0x0000 , 0x694D , 0x0078 , 0x0000 , 0x0000 , 0x0000 ,
211
224
0x3F80 , 0x0000 , 0x3F80 , 0x0000 , 0x3F80 , 0x0000 , 0x0000 , 0x025B ,
212
225
0x0000 , 0x4100 , 0x6F6D , 0x6E75 , 0x0074 , 0x0000 , 0x0000 , 0x0000 ,
213
- 0x3F80 , 0xDC7F , 0x3EA1 , 0x0000 , 0x3F80 , 0x0000 , 0x0000 , 0x035B ,
226
+ 0x3F80 , 0xF705 , 0x3F0E , 0x0000 , 0x3F80 , 0x0000 , 0x0000 , 0x035B ,
214
227
0x0000 , 0x4700 , 0x6961 , 0x006E , 0x0000 , 0xC2C0 , 0x0000 , 0x4040 ,
215
- 0x0000 , 0x3F80 , 0x0000 , 0x3F80 , 0xCCCD , 0x3DCC , 0x045B , 0x0000 ,
228
+ 0x0000 , 0x35C0 , 0x0000 , 0x3F80 , 0xCCCD , 0x3DCC , 0x045B , 0x0000 ,
216
229
0x6C00 , 0x0070 , 0x0000 , 0x41A0 , 0x4000 , 0x469C , 0x1C08 , 0x45A1 ,
217
230
0x6C1A , 0x3E6B , 0x0000 , 0x0000 , 0x055B , 0x0000 , 0x6800 , 0x0070 ,
218
231
0x0000 , 0x41A0 , 0x4000 , 0x469C , 0xD49A , 0x4318 , 0x6C1A , 0x3E6B ,
@@ -221,7 +234,7 @@ template <int NV> struct instance: public Waveshaper_impl::Waveshaper_t_<NV>
221
234
0x0000 , 0x0000 , 0x075B , 0x0000 , 0x7000 , 0x736F , 0x6874 , 0x0070 ,
222
235
0x0000 , 0x41A0 , 0x4000 , 0x469C , 0xF1BE , 0x4234 , 0x6C1A , 0x3E6B ,
223
236
0x0000 , 0x0000 , 0x085B , 0x0000 , 0x4D00 , 0x646F , 0x0065 , 0x0000 ,
224
- 0x0000 , 0x0000 , 0x3F80 , 0x0000 , 0x3F80 , 0x0000 , 0x3F80 , 0x0000 ,
237
+ 0x0000 , 0x0000 , 0x3F80 , 0x0000 , 0x0000 , 0x0000 , 0x3F80 , 0x0000 ,
225
238
0x3F80 , 0x0000
226
239
};
227
240
};
@@ -237,26 +250,27 @@ template <int NV> struct instance: public Waveshaper_impl::Waveshaper_t_<NV>
237
250
auto & wet_path = this ->getT (0 ).getT (1 ); // Waveshaper_impl::wet_path_t<NV>
238
251
auto & one_pole = this ->getT (0 ).getT (1 ).getT (0 ); // filters::one_pole<NV>
239
252
auto & one_pole1 = this ->getT (0 ).getT (1 ).getT (1 ); // filters::one_pole<NV>
240
- auto & minmax = this ->getT (0 ).getT (1 ).getT (2 ); // Waveshaper_impl::minmax_t<NV>
241
- auto & minmax1 = this ->getT (0 ).getT (1 ).getT (3 ); // Waveshaper_impl::minmax1_t<NV>
242
- auto & branch = this ->getT (0 ).getT (1 ).getT (4 ); // Waveshaper_impl::branch_t<NV>
243
- auto & chain = this ->getT (0 ).getT (1 ).getT (4 ).getT (0 ); // Waveshaper_impl::chain_t<NV>
244
- auto & gain = this ->getT (0 ).getT (1 ).getT (4 ).getT (0 ).getT (0 ); // core::gain<NV>
245
- auto & snex_shaper = this ->getT (0 ).getT (1 ).getT (4 ).getT (0 ).getT (1 ); // Waveshaper_impl::snex_shaper_t<NV>
246
- auto & faust = this ->getT (0 ).getT (1 ).getT (4 ).getT (1 ); // project::Distortion<NV>
247
- auto & one_pole2 = this ->getT (0 ).getT (1 ).getT (5 ); // filters::one_pole<NV>
248
- auto & one_pole3 = this ->getT (0 ).getT (1 ).getT (6 ); // filters::one_pole<NV>
249
- auto & wet_gain = this ->getT (0 ).getT (1 ).getT (7 ); // core::gain<NV>
253
+ auto & smoothed_parameter_unscaled = this ->getT (0 ).getT (1 ).getT (2 ); // Waveshaper_impl::smoothed_parameter_unscaled_t<NV>
254
+ auto & minmax = this ->getT (0 ).getT (1 ).getT (3 ); // Waveshaper_impl::minmax_t<NV>
255
+ auto & minmax2 = this ->getT (0 ).getT (1 ).getT (4 ); // Waveshaper_impl::minmax2_t<NV>
256
+ auto & minmax1 = this ->getT (0 ).getT (1 ).getT (5 ); // Waveshaper_impl::minmax1_t<NV>
257
+ auto & branch = this ->getT (0 ).getT (1 ).getT (6 ); // Waveshaper_impl::branch_t<NV>
258
+ auto & chain = this ->getT (0 ).getT (1 ).getT (6 ).getT (0 ); // Waveshaper_impl::chain_t<NV>
259
+ auto & gain = this ->getT (0 ).getT (1 ).getT (6 ).getT (0 ).getT (0 ); // core::gain<NV>
260
+ auto & snex_shaper = this ->getT (0 ).getT (1 ).getT (6 ).getT (0 ).getT (1 ); // Waveshaper_impl::snex_shaper_t<NV>
261
+ auto & gain1 = this ->getT (0 ).getT (1 ).getT (6 ).getT (0 ).getT (2 ); // core::gain<NV>
262
+ auto & faust = this ->getT (0 ).getT (1 ).getT (6 ).getT (1 ); // project::Distortion<NV>
263
+ auto & one_pole2 = this ->getT (0 ).getT (1 ).getT (7 ); // filters::one_pole<NV>
264
+ auto & one_pole3 = this ->getT (0 ).getT (1 ).getT (8 ); // filters::one_pole<NV>
265
+ auto & wet_gain = this ->getT (0 ).getT (1 ).getT (9 ); // core::gain<NV>
250
266
251
267
// Parameter Connections -------------------------------------------------------------------
252
268
253
269
dry_wet1.getParameterT (0 ).connectT (0 , dry_wet_mixer); // DryWet -> dry_wet_mixer::Value
254
270
255
271
this ->getParameterT (1 ).connectT (0 , dry_wet1); // Mix -> dry_wet1::DryWet
256
272
257
- auto & Amount_p = this ->getParameterT (2 );
258
- Amount_p.connectT (0 , minmax); // Amount -> minmax::Value
259
- Amount_p.connectT (1 , minmax1); // Amount -> minmax1::Value
273
+ this ->getParameterT (2 ).connectT (0 , smoothed_parameter_unscaled); // Amount -> smoothed_parameter_unscaled::Value
260
274
261
275
this ->getParameterT (3 ).connectT (0 , faust); // Gain -> faust::gain
262
276
@@ -273,10 +287,14 @@ template <int NV> struct instance: public Waveshaper_impl::Waveshaper_t_<NV>
273
287
// Modulation Connections ------------------------------------------------------------------
274
288
275
289
auto & dry_wet_mixer_p = dry_wet_mixer.getWrappedObject ().getParameter ();
276
- dry_wet_mixer_p.getParameterT (0 ).connectT (0 , dry_gain); // dry_wet_mixer -> dry_gain::Gain
277
- dry_wet_mixer_p.getParameterT (1 ).connectT (0 , wet_gain); // dry_wet_mixer -> wet_gain::Gain
278
- minmax.getWrappedObject ().getParameter ().connectT (0 , gain); // minmax -> gain::Gain
279
- minmax1.getWrappedObject ().getParameter ().connectT (0 , faust); // minmax1 -> faust::distortion
290
+ dry_wet_mixer_p.getParameterT (0 ).connectT (0 , dry_gain); // dry_wet_mixer -> dry_gain::Gain
291
+ dry_wet_mixer_p.getParameterT (1 ).connectT (0 , wet_gain); // dry_wet_mixer -> wet_gain::Gain
292
+ minmax.getWrappedObject ().getParameter ().connectT (0 , gain); // minmax -> gain::Gain
293
+ minmax1.getWrappedObject ().getParameter ().connectT (0 , faust); // minmax1 -> faust::distortion
294
+ minmax2.getWrappedObject ().getParameter ().connectT (0 , gain1); // minmax2 -> gain1::Gain
295
+ smoothed_parameter_unscaled.getParameter ().connectT (0 , minmax); // smoothed_parameter_unscaled -> minmax::Value
296
+ smoothed_parameter_unscaled.getParameter ().connectT (1 , minmax1); // smoothed_parameter_unscaled -> minmax1::Value
297
+ smoothed_parameter_unscaled.getParameter ().connectT (2 , minmax2); // smoothed_parameter_unscaled -> minmax2::Value
280
298
281
299
// Default Values --------------------------------------------------------------------------
282
300
@@ -302,13 +320,24 @@ template <int NV> struct instance: public Waveshaper_impl::Waveshaper_t_<NV>
302
320
one_pole1.setParameterT (4 , 1 .); // filters::one_pole::Mode
303
321
one_pole1.setParameterT (5 , 1 .); // filters::one_pole::Enabled
304
322
323
+ ; // smoothed_parameter_unscaled::Value is automated
324
+ smoothed_parameter_unscaled.setParameterT (1 , 100 .); // control::smoothed_parameter_unscaled::SmoothingTime
325
+ smoothed_parameter_unscaled.setParameterT (2 , 1 .); // control::smoothed_parameter_unscaled::Enabled
326
+
305
327
; // minmax::Value is automated
306
328
minmax.setParameterT (1 , 0 .); // control::minmax::Minimum
307
- minmax.setParameterT (2 , 21 .5 ); // control::minmax::Maximum
329
+ minmax.setParameterT (2 , 30 .5 ); // control::minmax::Maximum
308
330
minmax.setParameterT (3 , 0.492949 ); // control::minmax::Skew
309
331
minmax.setParameterT (4 , 0.1 ); // control::minmax::Step
310
332
minmax.setParameterT (5 , 0 .); // control::minmax::Polarity
311
333
334
+ ; // minmax2::Value is automated
335
+ minmax2.setParameterT (1 , -9.39724 ); // control::minmax::Minimum
336
+ minmax2.setParameterT (2 , 0 .); // control::minmax::Maximum
337
+ minmax2.setParameterT (3 , 5.73463 ); // control::minmax::Skew
338
+ minmax2.setParameterT (4 , 0 .); // control::minmax::Step
339
+ minmax2.setParameterT (5 , 1 .); // control::minmax::Polarity
340
+
312
341
; // minmax1::Value is automated
313
342
minmax1.setParameterT (1 , 0 .); // control::minmax::Minimum
314
343
minmax1.setParameterT (2 , 50 .); // control::minmax::Maximum
@@ -318,9 +347,13 @@ template <int NV> struct instance: public Waveshaper_impl::Waveshaper_t_<NV>
318
347
319
348
; // branch::Index is automated
320
349
321
- ; // gain::Gain is automated
322
- gain.setParameterT (1 , 20 .); // core::gain::Smoothing
323
- gain.setParameterT (2 , 0 .); // core::gain::ResetValue
350
+ ; // gain::Gain is automated
351
+ gain.setParameterT (1 , 96.2 ); // core::gain::Smoothing
352
+ gain.setParameterT (2 , 0 .); // core::gain::ResetValue
353
+
354
+ ; // gain1::Gain is automated
355
+ gain1.setParameterT (1 , 100.6 ); // core::gain::Smoothing
356
+ gain1.setParameterT (2 , 0 .); // core::gain::ResetValue
324
357
325
358
; // faust::distortion is automated
326
359
; // faust::gain is automated
@@ -345,13 +378,13 @@ template <int NV> struct instance: public Waveshaper_impl::Waveshaper_t_<NV>
345
378
346
379
this ->setParameterT (0 , 1 .);
347
380
this ->setParameterT (1 , 1 .);
348
- this ->setParameterT (2 , 0.316135 );
349
- this ->setParameterT (3 , 1 .);
381
+ this ->setParameterT (2 , 0.558457 );
382
+ this ->setParameterT (3 , 1.43051e-06 );
350
383
this ->setParameterT (4 , 5155.5 );
351
384
this ->setParameterT (5 , 152.83 );
352
385
this ->setParameterT (6 , 7118.38 );
353
386
this ->setParameterT (7 , 45.2361 );
354
- this ->setParameterT (8 , 1 .);
387
+ this ->setParameterT (8 , 0 .);
355
388
this ->setExternalData ({}, -1 );
356
389
}
357
390
~instance () override
@@ -371,7 +404,7 @@ template <int NV> struct instance: public Waveshaper_impl::Waveshaper_t_<NV>
371
404
{
372
405
// External Data Connections ---------------------------------------------------------------
373
406
374
- this ->getT (0 ).getT (1 ).getT (4 ).getT (0 ).getT (1 ).setExternalData (b, index ); // Waveshaper_impl::snex_shaper_t<NV>
407
+ this ->getT (0 ).getT (1 ).getT (6 ).getT (0 ).getT (1 ).setExternalData (b, index ); // Waveshaper_impl::snex_shaper_t<NV>
375
408
}
376
409
};
377
410
}
0 commit comments