An Efficient JMC Algorithm for the Rhythm Query in Music Databases