OSC Strings and Single Quotes

Discuss Lemur and share techniques.
Post Reply
ForestCat
Regular
Posts:59
Joined:02 Mar 2012 21:00
OSC Strings and Single Quotes

Post by ForestCat » 04 Feb 2017 04:55

Hi,

Wondering if anyone her can tell me if/how it's possible to either:

A.) Send string, i.e. Hello from Lemur via OSC WITHOUT single quotes, or
B.) Receive an OSC string in Lemur and strip out the single quotes

If Lemur has any string functions, i.e. remove n characters at position x, etc, I can't find them.

Thanks for any help

phase_change
Regular
Posts:114
Joined:31 May 2015 18:45
Location:Austin, TX

Re: OSC Strings and Single Quotes

Post by phase_change » 08 Feb 2017 04:10

1) It's not possible. The OSC syntax for concatenating multiple words into a single string requires you to use single quotes. Otherwise you will be sending an array of strings with each string ending where a space is.
2) Probably use a conditional? I don't want to think this one thru.
Have you tried turning it off and on again?

MrCorba
Regular
Posts:143
Joined:02 Sep 2013 20:17
Location:Netherlands

Re: OSC Strings and Single Quotes

Post by MrCorba » 08 Feb 2017 20:05

Lemur unfortunately doesn't have (m)any String functions.

If my assumption is correct, you're displaying the OSC string with a monitor object.

Try using a Text object, the quotes will disappear like a fart in a fan factory. Use

Code: Select all

setattribute(Text, 'content', 'Your OSC STRING');
Hopefully this helps
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba

ForestCat
Regular
Posts:59
Joined:02 Mar 2012 21:00

Re: OSC Strings and Single Quotes

Post by ForestCat » 18 Feb 2017 22:38

Thanks guys. As usual, no email notification of replies from this forum.

I needed to do this for different reasons, I'm using sysex to communicate with an arduino. I just gave up on my original idea and programmed around the Lemur limitation.

Post Reply