Ah thanks for this one, I spent a good half hour earlier today trying to recall where I know that intro from. Whosampled doesn’t have it
[x, sr] = wavread('rick.wav');
x_mono = mean(x,2);
X = specgram(x_mono, nfft, sr);
Y = X >= imdilate(X, ones(mask_size), 'same');
y = ispecgram(Y, nfft, sr);
% wavwrite(y, sr, 'roll.wav');
params: nfft, masksize (tuple)