how rhythm works in music?
Rhythm is music's pattern in time. Whatever other elements a given piece of music may have (e.g., patterns in pitch or timbre), rhythm is the one indispensable element of all music. Rhythm can exist without melody, as in the drumbeats of so-called primitive music, but melody cannot exist without rhythm.