worked on fir/iir filters
This commit is contained in:
@@ -181,8 +181,16 @@ private:
|
||||
}
|
||||
|
||||
// https://dsp.stackexchange.com/questions/4693/fir-filter-gain
|
||||
static void normalizeAC(std::vector<std::complex<float>>& kernel, const float freq) {
|
||||
throw std::runtime_error("TODO");
|
||||
static void normalizeAC(std::vector<std::complex<float>>& kernel, const float freq, const float sRate) {
|
||||
// std::complex<float> sum;
|
||||
// for (size_t i = 0; i < kernel.size(); ++i) {
|
||||
// const float t = (float) i / sRate;
|
||||
// const float v = std::sin(t*freq);
|
||||
|
||||
// }
|
||||
// for (auto f : kernel) {sum += f * sin;}
|
||||
// for (auto& f : kernel) {f /= sum;}
|
||||
throw std::runtime_error("todo");
|
||||
}
|
||||
|
||||
/** build a lowpass filter kernel */
|
||||
|
||||
Reference in New Issue
Block a user