Regula cantus firmi: an edition, translation, and commentary