General

Setting the contents of a text object via OSC

Started by ahonoe on .

Sign in or create an account to join the conversation.

18 posts

Topic starter
Hi All,

I know this has been asked before but how does one go about changing the value of a Text object via OSC? I have tried sending the string "@content hello" (without the quote) to the address of my object, "/Text/", on port 8000 on my iPad but no love. I have confirmed that the iPad is receiving OSC properly using TouchOSC.

Thanks.
Hi
What are you sending from?
For Max - use udpsend with ipad address and 8000 for port - send it message /Text @content Hi
Oh and it seems you don't always need the quotes - message box in max won't take them but works.
Cheers
MM
I'm using the French patching app Usine as well as Bidule.

I've tried with and without the quotes. Just wondering if I should try setting the property of another object with a simpler property setting. Maybe a LED?
To display contents from OSC,
I suppose the text object is called Text1
create a script it the text object , name it 'content' for example.
Set Execution on 'On OSC', verify the adress, have to be /Text1/content
Type : setattribute(Text1, 'content', OSC_ARGS);

now if you send a string for your application to the adress /Text1/content it must work.
Diversgens wrote:To display contents from OSC,
I suppose the text object is called Text1
create a script it the text object , name it 'content' for example.
Set Execution on 'On OSC', verify the adress, have to be /Text1/content
Type : setattribute(Text1, 'content', OSC_ARGS);

now if you send a string for your application to the adress /Text1/content it must work.
That's a bit overkill. All attributes can be set from OSC already using the '@' prefix :
/Text @content Whatever

To the original poster, can you post a screenshot of how you set up the destination of your OSC messages in Usine and Bidule ? Could be a mistake in the destination IP or port.
You are surely right Axel, but in some case (in Reaper for me, with dynamic content) the solution you give does not work.
I will post soon a beta template for Lemur in Reaper, perhaps can you look at it at this moment and point me to some mistake i have done.
Hi
I can use the @attribute method very easily in Max . . .
I had a look at Bidule, I don' t really use it, and could not work out there OSC methodology . . .
OSC has a few oddities - Sorry, follow it up with Axel -. . .
Cheers
MM
The only suggestion is the use of @ that is not part of OSC specification and if the software use @ for his propel purpose it doesn't send it via osc.
This is the case for Reaper, here is an extract from their default file:
# ----------------------------------------------------------------

# OSC is a protocol for sending information between musical devices, over a network.
# Unlike MIDI, which is defined as a stream of bytes with specific meanings, OSC
# messages are human-readable text strings with no predefined meanings. It is
# entirely up to individual musical devices to define what specific messages mean and
# when those messages are sent.

# For two devices to work together (such as REAPER an and OSC control surface
# device), the user must configure one or both devices to send and receive messages
# that have meaning for the other device. This pattern config file is how REAPER
# defines the messages it understands. In order to use REAPER with an OSC device,
# you can either create a custom pattern config file so that REAPER sends and
# receives messages the OSC device understands, or configure the OSC device to send
# and receive messages that REAPER understands, or both.

# For basic information about OSC, see http://opensoundcontrol.org/introduction-osc .

# Each line below is an action description in all caps, followed by a number of OSC
# message patterns. You can add, remove, or change patterns, delete lines, or comment
# out lines by adding '#', but do not change the action descriptions.

# The patterns following the action are the messages that REAPER will send and receive
# to and from the OSC device. An action can have no patterns (and will be ignored),
# one pattern, or many patterns.

# The patterns may contain the wildcard character '@'. (This is REAPER-only, not part
# of the OSC specification.) The '@' wildcard is used to specify the action target.

# ----------------------------------------------------------------

Perhaps Axel can clarify the reason why Lemur use '@' to send text to object, but what i see now, is "confusion" between different software.
For general information, i have found the script on Jazzmutant Forum with the same problem exposed http://forum.jazzmutant.com/viewtopic.php?t=2429&highlight=setattribute+text+content+oscargs

Anyway we have a working solution ....
Hi
In my view it is Reaper that is in error here - by using the @ symbol as a 'wildcard' when they shouldn't . .
Wildcards were defined within OSC 1.0.

But then they say
The '@' wildcard is used to specify the action target.

So lets ignore the mismatch of terminology -'@' = wildcard vs '@' = 'action specifier'
The '@' symbol is a recognised symbol OOP meta-data description for 'attributes', as is ':' which Jamoma uses
It would seem that Reaper is using it in it's own bizarre implementation using @ instead of *

The '@attribute' method does work quite easily with Max and SC, so it is not a Lemur problem as such
It is also possible that Reaper is using an OSC packeting system that is causing problems

Sending /Address @attribute value to Lemur does work . . .

CheersMM
Hi
Had a look at Reaper64 and did not see any OSC implementation whatsoever??
Any pointers anyone?? Is it an add-on?

The little bit of info I found on their site suggests that their '@' implementation is only relevant internally to Reaper.

You should still be able to construct outgoing messages using it how ever you like surely . . .

Cheers
MM
Hi
Reaper has certainly got a strange way of dealing with OSC imho . .
It would be far better if they used standard wildcards rather than their own conflicting system

Not sure that it would be possible to get it to send @attribute style messages
so perhaps using OnOSC scripts would be the best way around it.
Normal parameters, fader control etc can be sorted fairly easily

Cheers
MM