MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ sinc_highpass()

MAYAFLUX_API std::vector< double > MayaFlux::Kinesis::Discrete::sinc_highpass ( double  frequency,
double  sample_rate,
size_t  taps 
)

Windowed-sinc highpass FIR coefficients.

Spectral inversion of the corresponding lowpass. Requires odd taps for the inversion to be exact; even lengths are incremented internally.

Parameters
frequencyCutoff in Hz, clamped to (0, sample_rate/2)
sample_rateSampling rate in Hz
tapsKernel length, forced odd
Returns
Coefficient vector of length taps or taps + 1

Definition at line 187 of file Coefficients.cpp.

188{
189 const size_t n = force_odd(taps);
190 std::vector<double> h = lowpass_kernel(frequency, sample_rate, n);
191
192 for (double& v : h)
193 v = -v;
194 h[(n - 1) / 2] += 1.0;
195
196 return h;
197}
uint32_t h
Definition InkPress.cpp:28
double frequency

References frequency, and h.