Hi @dsteinschneider!
Where do you want your text to appear? Your problem reminded me of this:
Could it be of help in your case?
Gabriel
EDIT: it could be even simpler than that: from version 4060, Cantabile should support the modulus operation, so you could use something like (assuming CC #32 on channel 16 is used):
$( strpart( "C;C#;D;D#;E;F;F#;G;G#;A;A#;B", cc( 32, 16 ) %7))
I have no time to test it now…maybe later in the evening.