% apow2melspec - arrow from power spectra to log mel spectra
%
% apow2melspec :: 
%    N:natural      ~'size of FFT used to compute spectra',
%    nonneg         ~'sampling frequency',
%    [[1,2]->freq]  ~'upper and lower frequency limits',
%    L:natural      ~'number of mel bands to compute' 
% -> arrow( {[[dftbins(N)]]}, {[[L]]}, empty).

function o=apow2melspec(N,fs,flim,L)
	melW = tri_filterbank_aa(melspace(flim(1),min(flim(2),fs/2),L+2),binmap(0,fs/2,dftbins(N)));
	o=arr(@cc);
	function y=cc(x), y = log(melW*x+5e-9); end
end
