cantus firmus generate working recursively with rules 1-3 implemented and tested to work