function [chunks, feats] = chop(y, fs)

% Chop up a song on the onsets, put each chunk into the cell array
% CHUNKS, and save the feature vector for each chunk into the
% matrix FEATS, one song per row.

frame = 512;

ons = onsets(y, fs, frame);
feats = calcFeatures(y, ons, fs);

for i=1:size(ons,1);
  chunks{i} = y(ons(i,1):ons(i,2));
end
