|
|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
pkg load signal;
|
|
|
|
|
|
-%% Render a capsule impulse response through the FIR filter A2B matrix
|
|
|
+%% Render a calibrated capsule impulse response through the FIR filter A2B matrix
|
|
|
%%
|
|
|
%% m: number of measurement to render
|
|
|
%% FIR: matrix of A2B FIR filters
|
|
|
@@ -33,9 +33,9 @@ pkg load signal;
|
|
|
|
|
|
function [bf] = sphear_a_to_b(m, FIR, Nfft);
|
|
|
capnames = cellstr(['LF'; 'RF'; 'LB'; 'RB']);
|
|
|
- %% read in capsule signals and apply FIR filter
|
|
|
+ %% read in calibrated capsule signals and apply FIR filter
|
|
|
for c = 1:4
|
|
|
- cs(c,:) = wavread(["../data/current/af/a-format-0" sprintf("%02.0f", m) "-" char(capnames(c)) ".wav"]);
|
|
|
+ cs(c,:) = wavread(["../data/current/af/a-format-cal-" sprintf("%03d", m) "-" char(capnames(c)) ".wav"]);
|
|
|
for b = 1:4
|
|
|
%% we add trailing zeros to let the filter ring
|
|
|
bs(c,b,:) = fftfilt(reshape(FIR(b,c,:), 1, [])', cat(1, cs(c,:)', zeros(2*size(FIR(1,1,:))(3),1))', Nfft);
|