1) This example is implemented with 1-channel input/output. If I use it with 2-channel system, would both channels run adaptive algorithms independently?
2) My signal processing chain is as follows:
Code: Select all
mha.plugin_name = mhachain
mha.mhachain.algos = [addsndfile overlapadd]
...
mha.mhachain.overlapadd.plugin_name = mhachain
mha.mhachain.overlapadd.mhachain.algos = [fftfilterbank dc combinechannels ]
This is that part in "example_afc_live.cfg" :
Code: Select all
mha.algos = [downsample ...
adaptive_feedback_canceller:nlms ...
save_wave:vU ...
ac2wave:restore_E ...
analysispath ...
route:out ...
acmon:afc_mon ...
upsample
]
Code: Select all
mha.plugin_name = mhachain
mha.mhachain.algos = [addsndfile ...
downsample ...
adaptive_feedback_canceller:nlms ...
save_wave:vU ...
ac2wave:restore_E ...
analysispath ...
route:out ...
acmon:afc_mon ...
upsample ...
overlapadd]
mha.mhachain.overlapadd.plugin_name = mhachain
mha.mhachain.overlapadd.mhachain.algos = [fftfilterbank dc combinechannels ]
Code: Select all
# configure adaptive_feedback_canceller:NLMS
# The configuration variable "delay_w" compensates for the transducer delays in samples. Therefore
# it must be adapted to the sound hardware used. For this, the user is expected to measure the
# the delay caused by the transducers and the sound card in samples. For this purpose, the
# jack_iodelay tool can be used. In that case, the "extra_loopback_latency" of the sound hardware
# used should be measured. The user can refer to the jack documentation about how to use
# jack_iodelay:
# 1. Measure the round trip latency using jack_iodelay
# 2. Consider the "extra_loopback_latency" given by jack_iodelay
# 2. Add "fragsize" of the configuration to this latency
# 3. Add the length of the anti-aliasing filter in taps to this sum
# 4. Set the configuration variable "delay_w" to this sum.
# While calculating the total delay, the downsampling step should be considered as well.
# As an example, the current configuration and hence jack runs at 48 kHz. However this plugin
# (adaptive_feedback_canceller:nlms) operates at 16 kHz. Consequently, the total measured latency should
# be scaled accordingly before setting the configuration variable "delay_w".
mha.nlms.rho = 0.005 # convergence coefficient
mha.nlms.c = 1e-6 # stabilization parameter
mha.nlms.ntaps = 47 # number of taps in filter
mha.nlms.name_lpc = lpc # Name of the lpc coefficients variable
mha.nlms.lpc_order = 20
mha.nlms.name_e = vE # Name of error signal E, here estimated using LPC
mha.nlms.delay_w = 124
mha.nlms.delay_d = 161 # Length of the LPC buffer plus one (160 + 1)
mha.nlms.afc_delay = 96 # Delay applied to the signal in the forward path
mha.nlms.n_no_update = 256
mha.nlms.name_f = vWfull
mha.nlms.gains = 3 # Gain applied to the signal in the forward path
Code: Select all
mha.afc_mon.dispmode = matrix # correct dimensions in MATLAB