A clustering algorithm for recombinant jazz improvisations