4-bit variable Sysex Output


#1

Can Cantabile output 4-bit variable from bit 0 to 3? One that will repeat from 1-16 eight times until 128?

In the Sysex Encoder, [0]$(val[3…0]) gives a “partial byte” error. Am I missing some details in the expression?

As for binding, I also tried two methods unsuccessfully :

Return remainders after the variable is divided by 16:
IEEERemainder(value, 16) would not return any remainders in every byte 9-16.
In other programs, the remainder function usually gives the desired result of 0-15, 0-15… eight times.

Lastly, of course the Clamp function won’t repeat: Clamp [value, min=0, max=15]

The 4-bit variable is quite commonly used in various sysex implementations. With this, I’m hoping to control a Roland V-Synth in real-time.

Moreover, it’ll be great if Cantabile can also do bits 8-11, bits 12-13 etc.! I hope Cantabile can do this, so I can skip the DAW!

Thanks!

Pat


#2

Hi @tksense

The $(val[3…0]) is a sys-ex pattern descriptor used by the sys-ex encoder and decoder MIDI filters.

For sys-ex bindings you need to use sys-ex expressions. The syntax is different and supports full C-style expressions.

Try this instead:

(int(value) & 0x0f)

#3

hey @brad,

I played with this as well, but kept getting error messages when applying functions or operators to “value”:

image

Translation: “object reference not connected to object instance”

Experienced this on two machines so far - maybe something to do with German localization?

cheers,

Torsten


#4

Hey @Torsten,

What build are you running? I just setup German local and display language here and it seems to work ok:

Brad


#5

Hey @brad,

I’m using the latest build. It seems to depend on the source of the binding: when I bind a controller input to a sysex output, I get funny effects:

The “value” part is omitted in the output preview - only two output bytes.

And the AND expression creates an object error:

When binding the same sysex expression to Master Output Gain, the simple sysex expression correctly creates a three-byte output

And the AND expression works without any errors:

So it looks like something is funny about binding controller values to sysex expressions?

Hope this helps!

Cheers,

Torsten

BTW: haven’t ever seen Cantabile with German GUI translations - is that some secret work in progress or have I missed something. Looks weird: “Bindungen” :thinking:


#6

Hi @Torsten,

Ah ok, I can see what’s happening. Because you’re binding from a CC there is no value at the time the expression editor is trying to show the preview. ie: it relies on the incoming CC value to work. With the current builds if you just ignore the error and use the expression it’ll probably work and you can check the Cantabile’s log for any errors.

For the next build I’ll try to put in something so it uses the last received value perhaps.

There’s a great German translation of Cantabile’s GUI here. If you just drop the strings-de.json file in the same folder as Cantabile.exe and you’ve got Windows configured to run in German it should just work. I can’t comment on the accuracy of the translation though - it’s done by a volunteer and I don’t speak German, but he very diligent.

Brad