  We demonstrate relationships between the classic Euclidean algorithm and many
other fields of study, particularly in the context of music and distance
geometry. Specifically, we show how the structure of the Euclidean algorithm
defines a family of rhythms which encompass over forty timelines
(\emph{ostinatos}) from traditional world music. We prove that these
\emph{Euclidean rhythms} have the mathematical property that their onset
patterns are distributed as evenly as possible: they maximize the sum of the
Euclidean distances between all pairs of onsets, viewing onsets as points on a
circle. Indeed, Euclidean rhythms are the unique rhythms that maximize this
notion of \emph{evenness}. We also show that essentially all Euclidean rhythms
are \emph{deep}: each distinct distance between onsets occurs with a unique
multiplicity, and these multiplicies form an interval $1,2,...,k-1$. Finally,
we characterize all deep rhythms, showing that they form a subclass of
generated rhythms, which in turn proves a useful property called shelling. All
of our results for musical rhythms apply equally well to musical scales. In
addition, many of the problems we explore are interesting in their own right as
distance geometry problems on the circle; some of the same problems were
explored by Erd\H{o}s in the plane.
