Variable not sent via OSC
Variable not sent via OSC
Hi guys!
Having a trouble here:
Lemur is not sending variable defined inside the script through OSC to Ableton Live.
I've defined "b" variable in "Quant_switch" Object:
And I have a "Quant" script which defines the position of active switch (defines position of first non-null value) and assigns 1,2,4 or 0 to "b" variable
But after assigning "b" variable to be sent over OSC0, it doesn't go to Ableton:
Why "b" variable changes are not sent to Ableton?
What am I doing wrong?
Having a trouble here:
Lemur is not sending variable defined inside the script through OSC to Ableton Live.
I've defined "b" variable in "Quant_switch" Object:
And I have a "Quant" script which defines the position of active switch (defines position of first non-null value) and assigns 1,2,4 or 0 to "b" variable
But after assigning "b" variable to be sent over OSC0, it doesn't go to Ableton:
Why "b" variable changes are not sent to Ableton?
What am I doing wrong?
Last edited by Romang on 14 Jul 2012 06:43, edited 1 time in total.
Re: Variable not sent via OSC
What do you have to receive the OSC in Ableton?
Re: Variable not sent via OSC
I have Max receiving all OSC messages:
"print udp" shows all incoming messages on 8000 port except this "b" variable
I have tried to send variable to OSC1 and made one more port, but still the same - all other variables go into Max via OSC, except "b"
I did a monitor object to observe whether script "Quant" is doing all correct and it also shows the values which are being assigned to "b" variable:
Why it still doesnt send "b" over OSC is a secret for me
"print udp" shows all incoming messages on 8000 port except this "b" variable
I have tried to send variable to OSC1 and made one more port, but still the same - all other variables go into Max via OSC, except "b"
I did a monitor object to observe whether script "Quant" is doing all correct and it also shows the values which are being assigned to "b" variable:
Why it still doesnt send "b" over OSC is a secret for me
Re: Variable not sent via OSC
Hi
Easy way to debug in Max is to drop a message box in and wire to the right input . . .
The message should be being sent as /Container5/Quant_switch/b which is what you need to route.
Or use the custom address to make it whatever you want.
Cheers
MM
Easy way to debug in Max is to drop a message box in and wire to the right input . . .
The message should be being sent as /Container5/Quant_switch/b which is what you need to route.
Or use the custom address to make it whatever you want.
Cheers
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]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: Variable not sent via OSC
I know debugging in Max, that's how I know this "Container5/Quant_switch/b" variable is not coming INTO MAXMacciza wrote:Hi
Easy way to debug in Max is to drop a message box in and wire to the right input . . .
The message should be being sent as /Container5/Quant_switch/b which is what you need to route.
Or use the custom address to make it whatever you want.
Cheers
MM
I use "print udp" as I wrote earlier, which shows all incoming OSC messages which arrived.
So I think the error is somewhere in Lemur - the variable doesn't come from it.
Re: Variable not sent via OSC
Hi
Was just trying to point out that the OSC-route was not going to work because the address needs to be the full message.
Anyway will have to check but possibly because it is undefined it is not evaluated,
or because in the order of execution it has not been set yet - just a few thoughts of the top of my head.
So a solution? Make 'b' do something .
I split your script up a bit.
I created a container called _func which would contain various function.
I made an manual script called quant though the name could possibly be better
It take a number froom 0 to 3 and returns the numbers you want instead.
The 'b' expression now calls that function with the firstof(x) of the switch it is in
This then works top send the OSC message Cheers
MM
Was just trying to point out that the OSC-route was not going to work because the address needs to be the full message.
Anyway will have to check but possibly because it is undefined it is not evaluated,
or because in the order of execution it has not been set yet - just a few thoughts of the top of my head.
So a solution? Make 'b' do something .
I split your script up a bit.
I created a container called _func which would contain various function.
I made an manual script called quant though the name could possibly be better
It take a number froom 0 to 3 and returns the numbers you want instead.
The 'b' expression now calls that function with the firstof(x) of the switch it is in
This then works top send the OSC message Cheers
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]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
-
- Liine Staff
- Posts: 126
- Joined: 14 Dec 2011 12:12
Re: Variable not sent via OSC
Indeed, variables whose values are changed by assigning in a script do not send out their new values by default.Romang wrote:I know debugging in Max, that's how I know this "Container5/Quant_switch/b" variable is not coming INTO MAXMacciza wrote:Hi
Easy way to debug in Max is to drop a message box in and wire to the right input . . .
The message should be being sent as /Container5/Quant_switch/b which is what you need to route.
Or use the custom address to make it whatever you want.
Cheers
MM
I use "print udp" as I wrote earlier, which shows all incoming OSC messages which arrived.
So I think the error is somewhere in Lemur - the variable doesn't come from it.
You could send the OSC message within your script with oscout()
A workaround would be to set another variable in your script :
Code: Select all
if (a==0) b2 = 1;
else if (a==1) b2 = 2;
...
Re: Variable not sent via OSC
Thank you!Macciza wrote:Hi
Was just trying to point out that the OSC-route was not going to work because the address needs to be the full message.
Anyway will have to check but possibly because it is undefined it is not evaluated,
or because in the order of execution it has not been set yet - just a few thoughts of the top of my head.
So a solution? Make 'b' do something .
I split your script up a bit.
I created a container called _func which would contain various function.
I made an manual script called quant though the name could possibly be better
It take a number froom 0 to 3 and returns the numbers you want instead.
The 'b' expression now calls that function with the firstof(x) of the switch it is in
This then works top send the OSC message Cheers
MM
I will try your Lemur interface!
I know about OSC-route, it was just a chunk of all my patch
Re: Variable not sent via OSC
YES! This works for my interface, thanks for pointing to such a great function!axel_liine wrote: Indeed, variables whose values are changed by assigning in a script do not send out their new values by default.
You could send the OSC message within your script with oscout()
axel_liine wrote:
A workaround would be to set another variable in your script :
and set up the "b" variable to evaluate to "b2" (instead of leaving it blank). Then "b" will update to the value of "b2" anytime it is changed from a script, and output its new value via OSC.Code: Select all
if (a==0) b2 = 1; else if (a==1) b2 = 2; ...
this method isn't working...
But big thanks for pointing to oscout!