% Figure 10(a) of "Cancellation model of pitch perception" (JASA 97) global sr; % sampling rate sr = 10000; level = 90; % dB nchan = 2; % number of BM channels flo = 1040; % Hz - lowest BM channel frequency (fhi = sr/2) N = 100; % number of "presentations" start = 0.018; % s stop = 0.055; % s chunk = [start *sr : stop * sr] ; % s, portion to plot range = 0.0075; % s - range for ACH y = synth_damp; % scale level = level - 30; % 30 dB corresponds to RMS=1 in M&H's model. y = rms(y, fromdB(level)); % synthesize & apply gammatone filter [A, B] = MakeERBFilters(sr, nchan, flo); yy = ERBFilterBank(A, B, y); yy = flipud(yy); x = yy(1,:); % take lowest channel plot1(x(chunk)); set(get(gca, 'title'), 'String',... '"Cancellation model of pitch perception" - Fig. 10a');