From bdd8c21fcfff8041ea94a972903ce42e58c2a5c2 Mon Sep 17 00:00:00 2001 From: ozpv <39195175+ozpv@users.noreply.github.com> Date: Sat, 29 Aug 2026 23:04:49 -0500 Subject: add retain --- Core/Inc/Effects/retain.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 Core/Inc/Effects/retain.h (limited to 'Core/Inc/Effects/retain.h') diff --git a/Core/Inc/Effects/retain.h b/Core/Inc/Effects/retain.h new file mode 100755 index 0000000..4700493 --- /dev/null +++ b/Core/Inc/Effects/retain.h @@ -0,0 +1,34 @@ +/* + * retain.h + * + * Created on: Aug 23, 2026 + * Author: ozpv + */ + +#ifndef INC_EFFECTS_RETAIN_H_ +#define INC_EFFECTS_RETAIN_H_ + +#include +#include +#include "cs4272.h" + +/* must be a power of two + higher values give better frequency resolution + and must be paired with a higher BUFFER_SIZE */ +#define WINDOW_SIZE 4096 +/* change based on necessary overlap */ +#define HOP_SIZE (WINDOW_SIZE / 4) +#define OVERLAP_SIZE (WINDOW_SIZE - HOP_SIZE) +#define NUM_OVERLAPS (WINDOW_SIZE / HOP_SIZE) +#define COMPLEX_BIN_COUNT (WINDOW_SIZE / 2 - 1) + +void retain_init(void); +void retain( + const int32_t *samples_in, + int32_t *samples_out, + const size_t range_min, + const size_t range_max, + const enum Channel channel +); + +#endif /* INC_EFFECTS_RETAIN_H_ */ -- cgit v1.2.3