5#include "AudioLogger.h"
59 if (result > clipLimit) {
62 if (result < -clipLimit) {
63 result = -resultLimit;
97 if (!
active())
return input;
99 return factor_q.scale(input);
141 if (!
active())
return input;
186 if (!
active())
return input;
236 this->
p_percent = depthPercent > 100 ? 100 : depthPercent;
246 rate_hz = ms > 0 ? 1000.0f / ms : 0.0f;
254 rate_hz = hz > 0.0f ? hz : 0.0f;
263 p_percent = percent > 100 ? 100 : percent;
280 float p = degrees / 360.0f;
281 phase = p - floorf(p);
293 if (!
active())
return input;
321 w = 0.5f - 0.5f * cosf(6.2831853f * pos);
323 w = pos < 0.5f ? 2.0f * pos : 2.0f - 2.0f * pos;
389 inv_depth_q =
q1_14_t(1.0f) - depth_q;
414 if (!
active())
return input;
421 int32_t out = inv_depth_q.scale(input) + depth_q.scale(delayed_value);
426 int32_t write_int = (
int32_t)input + feedback_q.scale(delayed_value);
433 float write_val = (
float)input +
feedback * (
float)delayed_value;
455 q1_14_t feedback_q{0.0f}, depth_q{0.0f}, inv_depth_q{1.0f};
489 float release = 0.005,
float boostFactor = 1.0) {
523 if (!
active())
return input;
526 return gain.
scale(input);
562 PitchShift(
float shift_value = 1.0,
int buffer_size = 1000) {
584 if (!
active())
return input;
614 uint16_t releaseMs = 20, uint16_t holdMs = 10,
615 uint8_t thresholdPercent = 10,
float compressionRatio = 0.5) {
656 thresholdPercent / 100;
661 if (compressionRatio < 1.0f) {
669 if (!
active())
return input;
769 return gain.scale(inSample);
long map(long x, long in_min, long in_max, long out_min, long out_max)
Maps input to output values.
Definition Arduino.h:182
#define LOGD(...)
Definition AudioLoggerIDF.h:27
Real-time pitch shifting audio effect implementation.