You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
377 B
19 lines
377 B
#include <cmath>
|
|
//#include <cstdio>
|
|
|
|
#include "luts.h"
|
|
|
|
#include "dsp/filter.h"
|
|
|
|
float sinLUT[SIN_LUT_SIZE];
|
|
float kLUT[K_LUT_SIZE];
|
|
|
|
void genLUTs() {
|
|
for(size_t i = 0; i < SIN_LUT_SIZE; ++i) {
|
|
sinLUT[i] = sin((i * 2 * M_PI) / SIN_LUT_SIZE);
|
|
}
|
|
|
|
for(size_t i = 0; i < K_LUT_SIZE; ++i) {
|
|
kLUT[i] = cvToK(i * FILTER_CV_MAX / (K_LUT_SIZE - 1));
|
|
}
|
|
} |