Gain vs. Frequency
Impulse Response
Filter settings (http://t-filter.engineerjs.com/)

modify fir_neg_one[] of init.c in sdk demo apu:
forum: signed fixed point number between -1 ~ 1
so use of int16_t giving -32768 …. 32768 matches the output of TFilter website (choose C/C++ array, int, 16 bit):

uint16_t fir_neg_one[] = { // -32768
0x8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
uint16_t fir_one[] = { // 32767
0x7fff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
uint16_t fir_half[] = { // 16384
0x4000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};

int16_t fir_lowpass_signed[] = { // http://t-filter.engineerjs.com/ 44100 Hz 17 taps pass 0-5000, stop 10000-22050
110,-93,-755,-1561,-1447,641,4552,8505,10184,8508,4552,641,-1447,-1561,-755,-93,110
};

apu_dir_set_prev_fir((uint16_t *)fir_lowpass_signed); //http://t-filter.engineerjs.com/

Leave a Reply