On Show Notes Page (Show Notes - Cantabile - Software for Performing Musicians), there is a reference to the Variables that can be used within Show Notes (Variables - Cantabile - Software for Performing Musicians). That page then mentions the typical Cantabile Functions (Functions - Cantabile - Software for Performing Musicians). This is where it gets a bit confusion, as that page further references the .NET Math Class Functions can be used (Math Class (System) | Microsoft Learn). This is just for reference as to how I got to these more complicated functions.
There are many functions listed that could be used in Show Notes to modify the display; however, I cannot get any of those .Net Math Class Functions to work.
The specific example I’m trying to do is bind the “Tempo LEDs” to the “Output Port - Onscreen Keyboard” to massage into a blink a dot. If you have worked with a 4/4 output from Tempo LEDs, it outputs and repeates the numeric sequence 32, 33, 34, 35. This numeric sequence can easily be displayed on the Show Notes. If the time signature changes, the numeric sequence changes. My thoughts were to use DivRem (Sequence, 2) == 1, then do X, else do Y.
This is what I believe the format to be, but it doesn’t work:
$(DivRem(cc(127,1),2))
cc(127,1) is the output from the Tempo LEDs and is 32, 33, 34, 35. I would expect the DivRem function to output 0, 1, 0, 1, 0, 1, 0… etc. as the transport is playing. But, the Show Notes displays this:
The workaround it to hardcode cc(127,1)==32, 33, etc. and act with nested if/then statements. But, those .NET Math Functions might be useful someday if I could get them working. I fear it may be because of using 7-bit cc constructs and DivRem is expecting formal 8, 16, 32, 64 bit integers.
Tried this out to bounce a square every beat.
$(tempo) BPM $(cc(127,1)==32 ? “ " : cc(127,1)==33? " ”:cc(127,1)==34 ? “ " : " ”)
Which shows this in Show Notes (the box moves right/left every beat):
But still no luck with the .NET Math Functions.