One of the goals of the study of music theory is to develop sets of rules to describe different styles of music. By formalising these rules so that their semantics are machine intelligible, it is possible to use computers to reason about and analyse these rules -- computational music theory. Anton is an automatic composition system based on this approach. It formalises the rules of Renaissance Counterpoint using AnsProlog and uses an answer set solver to compose pieces. This paper discusses Anton, presenting the ideas behind the system and focusing on the challenges of modelling and synthesising rhythm.