|
12 | 12 | #include <unistd.h> |
13 | 13 | #include <signal.h> |
14 | 14 |
|
15 | | -#include <atomic> |
16 | 15 | #include <iostream> |
17 | 16 | #include <fstream> |
18 | 17 | #include <cstring> |
@@ -61,10 +60,10 @@ class NeuralRack |
61 | 60 | void registerParameters() { |
62 | 61 | // name group min, max, def, step value isStepped type |
63 | 62 | param.registerParam("Buffered Mode", "Global", 0,2,0,1, (void*)&engine.buffered, true, Is_FLOAT); |
64 | | - param.registerParam("Enable", "Global", 0,1,0,1, (void*)&engine.bypass, true, IS_UINT); |
| 63 | + param.registerParam("Enable", "Global", 0,1,1,1, (void*)&engine.bypass, true, IS_UINT); |
65 | 64 |
|
66 | 65 | param.registerParam("Gate Enable", "NoiseGate", 0,1,0,1, (void*)&engine.ngOnOff, true, IS_UINT); |
67 | | - param.registerParam("Gate Thresh", "NoiseGate", 0.01, 0.31, 0.017, 0.001, (void*)&engine.ngate->threshold, false, Is_FLOAT); |
| 66 | + param.registerParam("Gate Thresh", "NoiseGate", 0.01,0.31,0.017,0.001, (void*)&engine.ngate->threshold, false, Is_FLOAT); |
68 | 67 |
|
69 | 68 | param.registerParam("Norm Slot A", "Pedal", 0,1,0,1, (void*)&engine.normSlotA, true, IS_INT); |
70 | 69 | param.registerParam("Input Gain A", "Pedal", -20,20,0,0.1, (void*)&engine.inputGain, false, Is_FLOAT); |
@@ -229,14 +228,16 @@ class NeuralRack |
229 | 228 | engine.peq->fVslider3 = 0.0; |
230 | 229 | engine.peq->fVslider4 = 0.0; |
231 | 230 | engine.peq->fVslider5 = -20.0; |
232 | | - engine.ngate->threshold = -0.017; |
| 231 | + engine.ngate->threshold = 0.017; |
233 | 232 | engine.ngOnOff = 0; |
234 | 233 | } |
235 | 234 |
|
236 | 235 | void initEngine(uint32_t rate, int32_t prio, int32_t policy) { |
237 | 236 | engine.init(rate, prio, policy); |
238 | 237 | initEQ(); |
239 | 238 | engine.bypass = 1; |
| 239 | + param.setParamDirty(1 , true); |
| 240 | + param.controllerChanged.store(true, std::memory_order_release); |
240 | 241 | s_time = (1.0 / (double)rate) * 1000; |
241 | 242 | } |
242 | 243 |
|
|
0 commit comments