Adding rhythms.py. Functions inspired from "Geometry of musical rhythm"