Want to show values on Cantabile interface based on CC ranges

I’m guessing I might need to use ReasScript but thought to ask here for advice before I perhaps over complicate this.

I want to move a slider on my controller. 1-7 would cause the letter “C” to appear, 8-14 for “C#”, 15-21 for “D” and so on.

Thanks in advance for any ideas

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.

After a few test, and after realizing how stupid I was assuming you needed the modulus operation :laughing:,
I think this could work (using cc #33 on midi channel 1)

$( strpart( “C;C#;D;D#;E;F;F#;G;G#;A;A#;B”, ((cc(33,1)-1)/7)))

Gabriel

Busy week since you posted this suggestion. Am I right that I need to route the source input to the controller bar before the above can work?

EDIT - routed the controller to the onscreen keyboard - looks like it’s picking up the controller now

EDT 2 - Almost have it working:
$(strpart( “C;C#;D;D#;E;F;F#;G;G#;A;A#;B”, ((cc(15,1))/11.5)))

Image below doesn’t include latest division by - its working now
image

Thanks

1 Like

Hi @dsteinschneider!

Glad to be of help!

However, are you sure that you are able to reach A# and B with this command?
The highest value you can get from a CC is 127, which would give you an index of 10 into the string (and there are 12 entries). That’s why I thought your initial choice of 7 was ok.

Just wondering…

Cheers!
Gabriel