1. A method of retrieving a musical element from a library comprising a plurality of musical elements, the method comprising: receiving an indication of a query musical element comprising a first plurality of percussive events; generating a rhythmic signature for the query musical element, wherein the rhythmic signature of the query musical element comprises a time-stamped series of durations of the first plurality of percussive events; searching the library to identify a candidate musical element having a rhythmic signature that is similar to the rhythmic signature of the query musical element, the rhythmic signature of each of the plurality of musical elements in the database comprising a time-stamped series of durations of the plurality of percussive events that comprise that musical element; and retrieving the candidate musical element from the library.