utility routines for musical canon construction