377 |
|
|
378 |
void SmoothCCUnit::AddSmoothCC(uint8_t Controller, float Influence, short int Curve, float Smooth) { |
void SmoothCCUnit::AddSmoothCC(uint8_t Controller, float Influence, short int Curve, float Smooth) { |
379 |
if (Smooth > 0) { |
if (Smooth > 0) { |
380 |
Smoothers[Controller].trigger(Smooth / 1000.0f, GetSampleRate()); |
if (Smoothers.size() >= Smoothers.capacity()) { |
381 |
AddCC(Controller, Influence, Curve, &Smoothers[Controller]); |
std::cerr << "Maximum number of smoothers reached" << std::endl; |
382 |
|
return; |
383 |
|
} |
384 |
|
|
385 |
|
Smoothers.increment().trigger(Smooth / 1000.0f, GetSampleRate()); |
386 |
|
AddCC(Controller, Influence, Curve, &Smoothers[Smoothers.size() - 1]); |
387 |
} else { |
} else { |
388 |
AddCC(Controller, Influence, Curve); |
AddCC(Controller, Influence, Curve); |
389 |
} |
} |