Referencing objects using OSC internally in Lemur

Discuss Lemur and share techniques.
Post Reply
newtfish
Newbie
Posts: 40
Joined: 09 Apr 2011 19:32

Referencing objects using OSC internally in Lemur

Post by newtfish »

Hi,

I'm wondering whether it is possible through scripting to reference/set an object's values using OSC internally within Lemur? e.g. is there an oscin() function??

For instance I have an object called "Knob" with the OSC address:

/Knob/x

I know I can set "Knob" values by using:

Knob.x = 0.456

However, is there any way I can set it's values by it's OSC address?: e.g.

oscin(0,'/Knob/x') = 0.456;

I've tried setting the "OSC Host" address to the same as the iPad/Lemur, but that doesnt seem to work.

It seems the only way to change an object's value is by sending it from an external network.
ndivuyo
Regular
Posts: 278
Joined: 23 May 2014 00:24

Re: Referencing objects using OSC internally in Lemur

Post by ndivuyo »

I'm not aware of any oscin() personally, maybe you could elaborate on what you are trying to do and there is another solution?
Also, it's not by it's osc address, but there is setexpression() too
newtfish
Newbie
Posts: 40
Joined: 09 Apr 2011 19:32

Re: Referencing objects using OSC internally in Lemur

Post by newtfish »

Hi Ndivuo,

Many thanks.

I would like to nest objects many levels deep, but reference them through OSC instead of having to remember where they are nested.

The objects are referenced depending on how they are nested e.g.

Knob1 is inside Container2, which is inside Container1

If I want to set Knob1 I can either use from a script (internally within Lemur):

Container1.Container2.Knob1.x = 0.435;

OR

I can set the Knob from OSC, but I can only do this from another computer on the network (only externally outside Lemur)

e.g.

/Container1/Container2/Knob1/x 0.435;


I would like to be able to set the knob, internally within Lemur, based upon its OSC address

For instance, I could still keep the Knob where it is (nested inside the two containers), but if it's OSC address was /MyEasyKnobAddress/x then I could simply do

oscin(0,'/MyEasyKnobAddress/x', 0.435);

To set it.

It's a shame Lemur cant do this because it would be very useful. We could allow sysex input of the OSC message for instance, decoding inside the template, and then controlling the various objects through OSC messages.

Cheers
ndivuyo
Regular
Posts: 278
Joined: 23 May 2014 00:24

Re: Referencing objects using OSC internally in Lemur

Post by ndivuyo »

I see, so you want to be able to refer to the custom address that you can set in the OSC mapping settings of the object. hmm, maybe there is a solution. But yeah, I guess I would try and make all my references local within the containers so that problem wouldn't arise, but sometimes you just can't!
Let me think on it, maybe someone else will chime in
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Referencing objects using OSC internally in Lemur

Post by Macciza »

Hi
This is easily achieved, you're just going about it backwards . . .
No OSCIn function is needed though you could write one if needed...
remember Lemur receives OSC locally on port 8000, anything sent there goes to Lemur....
So simply set say OSC 7 to localhost,your local name, 127.0.0.1 or your iPads Ip i.e. localhost, or macciza-ipad.local, or 127.0.0.1, or 192.168.0.10(use your address)
Then send OSC out on OSC 7 which will loopback to the iPad ....
Simple...
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
newtfish
Newbie
Posts: 40
Joined: 09 Apr 2011 19:32

Re: Referencing objects using OSC internally in Lemur

Post by newtfish »

There seems to be no way to listen to incoming OSC, other than specifying an address to listen to. e.g. Wild Card.

I have incoming OSC from 127.0.0.1 . However if I want to obtain the OSC, the only way to do it, seems to be to specify an OSC address in an "On OSC" script.

It seems impossible to listen to all incoming OSC. Would be so nice if we could specify a variable like "OSC_VAL" in a "On OSC" script, which would listen on all incoming OSC.

Then we would simply get:

OSC_VAL = /Knob/x;
OSC_ARGS[0] = 0.54654

Seems not possible to do today

Cheers

N
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Referencing objects using OSC internally in Lemur

Post by Macciza »

But objects pretty much just listen for there OSC address anyway ...
Just send it out OSC 7 -set as localhost- and it should be picked up . . .
^F-Localhost.jzml
(6.86 KiB) Downloaded 58 times
Is this what you are after?
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
newtfish
Newbie
Posts: 40
Joined: 09 Apr 2011 19:32

Re: Referencing objects using OSC internally in Lemur

Post by newtfish »

Hi Macizza,

I'm trying to capture all incoming OSC (rather than specifying an address to capture). I'm guessing this is not possible.

It's possible to listen on a specific address eg '/knob/x'

But it is not possible to listen to all incoming OSC,

Basically, I would like to capture the OSC coming in from the loopback address and then convert it into sysex for sending out through a midi channel. The only way it seems to do this is to forget OSC alltogether and just use sysex in each object. However this is a huge pain to set up for multiple objects.

I noticed your wildcard pattern matching post here. I'm guessing this is exactly what I need - https://forum.liine.net/viewtopic.php?f=28&t=1107 However, not implemented in Lemur :/

Cheers
Post Reply