Page 1 of 2

Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Tue Oct 31, 2017 19:26
by p8guitar
Is it possible to choose the blendmode with OSC? I'd like to quickly change the blendmode with a button, because it is quite tedious with the mouse.
The OSC synthax that Resolume shows is:
/composition/layers/2/video/mixer/blendmode
OSC type tag: int 0 through 50
(actually it reads "trough", not through.. :roll: )
I tried it with TouchOSC, but it doesn't work. I tried a multitoggle (value range 0 to 50, exclusive mode, 50 toggles) and a multipush (value range from 0 to 49).
I tried single push buttons or toggle buttons, too, but no success. i have no idea what the value range should be for the single push or toggle buttons.

By the way - in the tutorial video I see three buttons per layer for blendmodes. In R6 it is only one (drop-down menue) button. I think the three buttons are very convenient and make a lot of sense, why was this changed?

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Tue Oct 31, 2017 21:48
by Zoltán
In another thread someone had some issues with TouchOsc(?) putting a / in front of the address you specify.
You can check the actual incoming messages in Preferences/OSC.
You see a button on the top right of the preferences window, click it and the OSC inspector opens, showing you the incoming messages.
Képernyőfotó 2017-10-31 - 21.48.06.png
Képernyőfotó 2017-10-31 - 21.48.06.png (4.09 KiB) Viewed 7575 times

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Wed Nov 01, 2017 12:17
by p8guitar
Thank you very much Zoltán for the hint at the osc monitor in the preferences, this helps to understand what's happening.
there is no double "//", this is not the problem. Resolume receives this message from a push button:
Address: /composition/layers/1/video/mixer/blendmode
Type Tags: f
Values: float32: 3
I would expect that this choses the 3rd blendmode - actually nothing happens.

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Wed Nov 01, 2017 13:04
by Zoltán
Which R6 beta do you have?
We have a ticket where the transition and layer blends are set to ToWhite on incoming OSC messages trying to set them. You probably found this bug again.

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Wed Nov 01, 2017 18:23
by p8guitar
I've got "Version 6.0.0 rev60295", don't know which beta this is.

Maybe the problem is that touchosc sends floating values, not integer. I can send integer values from Ableton Live with singlenotegrabber, and this works, it chooses the blendmode.
But in other cases it is not important if the value is float or integer. for example the default Resolume touchosc mapping sends
Address: /composition/layers/1/clear
Type tags: f
Values: float32: 0 and after that float32: 1
and this works!

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Thu Nov 02, 2017 14:44
by Zoltán
Turns out, when these particular blend mode selectors receive floats then they set the selected item normalized.
So sending a 0.5f would set the item that is in the middle of the list, you could use a dial this way to roll through the blend modes.
Sending ints you can select the items directly by index.

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Thu Nov 09, 2017 09:41
by edwin
If the OSC sender has the ability to send strings this will work even better.
You can send the name of the blend (as it appears in the list) instead of it's index.

for example:
/composition/layers/1/video/mixer/blendmode "Alpha"

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Fri Nov 10, 2017 09:56
by .lov.
edwin wrote:You can send the name of the blend (as it appears in the list) instead of it's index.

for example:
/composition/layers/1/video/mixer/blendmode "Alpha"
This is sweeeet! 8-)

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Fri Nov 10, 2017 21:23
by edwin
Some other additions to the OSC implementation you guys may appreciate are these:

We support some additional arguments that determine how values should be interpreted:
Use a "+", "-" or "*" to respectively add, subtract or multiply the current value with the incoming one:

Examples:
Add 0.2 to the Layer's opacity
/composition/layers/1/video/opacity "+" 0.2

Subtract 0.2 from the Layer's opacity
/composition/layers/1/video/opacity "-" 0.2

Multiple the Layer's opacity with 1.1
/composition/layers/1/video/opacity "-" 1.1

We support setting an absolute values instead of normalised when applicable:
Use the "a" as string argument to specify you are setting an absolute value.
Example:
Set the layer's video width to 1200
/composition/layers/1/video/width "a" 1200

And last but not least we now also support the retrieving of current values through OSC.
Add a "?" as prefix to your OSC address if you want Resolume to send you the current value that belongs to that address.
The value belonging to the address is looked up and send out as OSC message.
Example:
Ask the value of the Layer's video width.
?/composition/layers/1/video/width

Re: Blendmode: Choose blendmode with OSC/ with buttons?

Posted: Sat Nov 11, 2017 07:46
by .lov.
edwin wrote:Use a "+", "-" or "*" to respectively add, subtract or multiply the current value with the incoming one
This is nice too! Do you have these new features documented anywhere else than this topic?
edwin wrote: And last but not least we now also support the retrieving of current values through OSC.
Add a "?" as prefix to your OSC address if you want Resolume to send you the current value that belongs to that address.
The value belonging to the address is looked up and send out as OSC message.
Example:
Ask the value of the Layer's video width.
?/composition/layers/1/video/width
Does not that actually incompatible with the OSC specification? According to the docs an OSC Address Pattern should start with "/".