This article discusses a computer model of the process of listening to simple rhythms. The model consists of (1) a way of dividing the rhythm into appropriate chunks, (2) a means of constructing recognizers for the chunks, and (3) an organization of the recognizers into a hierarchical structure. Each node in the structure is a recognizer for the nodes immediately below it in the hierarchy. The model explains certain aesthetic qualities of music as necessary for the model's efficient function. In particular, the model provides a procedural explanation for what Leonard Meyer (1956) has called the "law of return," which states that an important organizational principle in music is the return to previously heard material after an intervening time during which the material is absent. The model uses points where this occurs to determine the overall structure of the rhythm and to construct a hierarchical description.