We developed a system that learns the rhythmical structure of percussion sequences from an audio example in an unsupervised manner, providing a representation that can be used for the generation of stylistically similar and musically interesting variations. The procedure consists of segmentation and symbolization (feature extraction, clustering, sequence structure analysis, temporal alignment). An a low level, the percussion sequence is transcribed as a multi-level discretization. The regularity of the sequence, as a high level information source, is examined on each clustering level and the most regular level is used to estimate inter beat interval and metrical phase of the sequence. Then, variations on the original sequence are generated, recombining the audio material derived from the sample itself. A metrically reduced version of the original and the generations are played to two professional percussionists in an informal experiment, thereby providing a subjective evaluation of the rhythmical analysis system. The results reveal that the generations are interesting and maintain the style and the meter of the original sample. This indicates the benefit of using an unsupervised multi-level clustering procedure in conjunction with high level structural constraints. This work is a joint project with Marco Marchini (Music Technology Group, UPF, Barcelona and Srikanth Cherla, City University London).