The basic trance problem:
kick if i%4 == 0
clap if i%8 == 4
hat if i%8 in [0,2,6,7]
bass always, according to some function of i