A gammatone filter is a linear filter described by an impulse response that is the product of a gamma distributionand sinusoidal tone. It is a widely used model of auditory filters in the auditory system.
감마톤 필터 대역폭은 1.01일 때와 필터 차수 4일 때 청각 특성을 가장 잘 반영한다.(한국음향학회 논문). 아래 매트랩 툴박스의 감마톤 필터의 필터 차수는 4로, 대역폭은 1.019로 설정되어있다. (gammatoneFast.m파일 참고)
Matlab Toolbox - need to install
bm =
gammatoneFast(x,cfs,fs)
bm =
gammatoneFast(...,align)
[bm,env] =
gammatoneFast(...)
[bm,env,delay]
= gammatoneFast(...)
NOTE: this
function is now available from the IoSR Matlab Toolbox as
iosr.auditory.gammatoneFast.
<Example>
fs = 48000; %
sample rate
numchans = 8; %
number of frequency channels
t =
-0.005:1/fs:0.025; % time (s)
% impulse
imp =
zeros(numel(t), 1);
imp(t==0) = 1;
% centre
frequencies
cfs =
iosr.auditory.makeErbCFs(500, 7500, numchans);
% calculate
impulse response fine structure
x1 =
iosr.auditory.gammatoneFast(imp, cfs, fs);
x2 =
iosr.auditory.gammatoneFast(imp, cfs, fs, true);
% normalise each
frequency for plotting
for c =
1:numchans
x1(:,
c) = x1(:, c) ./ max(abs(x1(:, c)));
x2(:,
c) = x2(:, c) ./ max(abs(x2(:, c)));
end
% draw
figure
% non-phase
aligned
subplot(1,
2, 1), iosr.figures.multiwaveplot(t*1000,
1:numchans, x1')
h = gca;
% phase
aligned
subplot(1,
2, 2), iosr.figures.multiwaveplot(t*1000,
1:numchans, x2')
h(2) =
gca;
% plot
settings
set(h,
'yticklabel', num2str(round(cfs)'))
for n =
1:2
xlabel(h(n),
'Time [ms]');
ylabel(h(n),
'Frequency [Hz]');
end
title(h(1),
'Non-phase-aligned gammatone filterbank')
title(h(2),
'Phase-aligned gammatone filterbank')
출처: <https://kr.mathworks.com/matlabcentral/fileexchange/32212-gammatone-filterbank>
댓글 없음:
댓글 쓰기