MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / initAntiresonator

Method initAntiresonator

extlibs/soloud/src/audiosource/speech/resonator.cpp:25–35  ·  view source on GitHub ↗

Convert formant freqencies and bandwidth into anti-resonator difference equation constants */

Source from the content-addressed store, hash-verified

23/* Convert formant freqencies and bandwidth into anti-resonator difference equation constants
24 */
25void resonator::initAntiresonator(
26 int aFrequency, /* Frequency of resonator in Hz */
27 int aBandwidth, /* Bandwidth of resonator in Hz */
28 int aSamplerate)
29{
30 initResonator(aFrequency, aBandwidth, aSamplerate); /* First compute ordinary resonator coefficients */
31 /* Now convert to antiresonator coefficients */
32 mA = 1.0f / mA; /* a'= 1/a */
33 mB *= -mA; /* b'= -b/a */
34 mC *= -mA; /* c'= -c/a */
35}
36
37/* Generic resonator function */
38float resonator::resonate(float input)

Callers 1

frame_initMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected