Refactor clef changes code
Dynamic programming addition to permutations for tuplet filtering