crop the edges to nearest beats