Prefilter FIR order ist stored in conf.wfs.hpreFIRorder
shall be an even integer M, resulting in a filter of length M+1
default is M = 128
for odd M, M+1 is used and firls() in wfs_fir_prefilter() issues a warning
time alignment in sound_field_imp_wfs() and sound_field_imp_localwfs() will be correct nonetheless
odd M raises an error in wfs_fir_prefilter
Change from previous behaviour:
previously: fixed M=128 was used and the IR's last sample was discarded, resulting in a filter length of 2^7
now: default setting uses the full length 2^7 + 1
rationale:
I found the truncation a bit of a hack.
I don't see any point in having a power-of-2 filter:
convolution() is not partitioned and the length should be dominated by the wfs delays for reasonable M, conf.N and SSD setups.
difference in magnitude is around -60db.
Remarks:
conf.localsfs.wfs can use its own hpreFIRorder, (is accounted for in sound_field_imp_localwfs())
sound_field_imp_wfs() and sound_field_imp_localwfs() compensate the prefilter delay only if the FIR filter is used.
(The IIR filter should be minimum phase.)
Variable FIR prefilter order for time-domain WFS
fixes #52
conf.wfs.hpreFIRorder
for odd M, M+1 is used andfirls()
inwfs_fir_prefilter()
issues a warningtime alignment insound_field_imp_wfs()
andsound_field_imp_localwfs()
will be correct nonethelesswfs_fir_prefilter
Change from previous behaviour:
convolution()
is not partitioned and the length should be dominated by the wfs delays for reasonable M,conf.N
and SSD setups.Remarks:
conf.localsfs.wfs
can use its ownhpreFIRorder
, (is accounted for insound_field_imp_localwfs()
)sound_field_imp_wfs()
andsound_field_imp_localwfs()
compensate the prefilter delay only if the FIR filter is used. (The IIR filter should be minimum phase.)