OSC ouput don't work with old python script

Archive of the non-categorized posts related to the QLC+ technical support.
Please do not create new threads here, instead, use the categories above !
Post Reply
User avatar
sbenejam
Posts: 625
Joined: Sun Apr 12, 2015 6:28 pm
Location: Spain
Real Name: Santiago Benejam Torres
Contact:

Today I tested an old python script that I made to control an external program. And did not work. Something is changed on qlcplus versions since 4.9. The script works with qlcplus 4.8.5 and don't work with newer versions.
The python script uses python-liblo, I tested too with a python script that uses pyOSC module and I get this error: "OSCMessage's typetag-string lacks the magic ','". I tested qlcplus 4.10.2 and I can send osc data from my laptop to a qlcplus on other computer. I tested too qlcplus with TouchOSC input and feedback and this setup works. My laptop runs Xubuntu 15.10 and the desktop Ubuntu 14.10.
I think something changed in OSC plugin since qlcplus 4.9.
janosvitok
Posts: 1336
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Santiago,

can you please attach your script (or a simplified one) that reproduces the problem? Ideally both versions (using liblo and pyOSC).
User avatar
sbenejam
Posts: 625
Joined: Sun Apr 12, 2015 6:28 pm
Location: Spain
Real Name: Santiago Benejam Torres
Contact:

janosvitok wrote:Santiago,

can you please attach your script (or a simplified one) that reproduces the problem? Ideally both versions (using liblo and pyOSC).
Hi Jano,
Hera are the files, remove the final ".txt"
Attachments
pyosc-test.py.txt
(1.47 KiB) Downloaded 72 times
osc-prova.py.txt
(1.05 KiB) Downloaded 84 times
User avatar
sbenejam
Posts: 625
Joined: Sun Apr 12, 2015 6:28 pm
Location: Spain
Real Name: Santiago Benejam Torres
Contact:

I have found this in osc_lib.py file of pyOSC package.

if not typetags.startswith(","):
raise OSCError("OSCMessage's typetag-string lacks the magic ','")
User avatar
mcallegari
Posts: 4876
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Hi Santiago

The OSC plugin has been completely rewritten on version 4.9.0. However it works with TouchOSC and PureData

This is where the "," is added
https://github.com/mcallegari/qlcplus/b ... er.cpp#L48

It is annoying, but what you can do is to save two traces with wireshark: one with QLC+ 4.8.5 and one with 4.10.2b and compare the packets.
I expect the syntax to be the same, but let's double check it.

[EDIT] Also, are you using a custom Input Profile ? If so, can I have a look please ?
User avatar
sbenejam
Posts: 625
Joined: Sun Apr 12, 2015 6:28 pm
Location: Spain
Real Name: Santiago Benejam Torres
Contact:

A quick look to the packets captured seems that the packets length are not exactly the same. Remove .txt extension.
I hope that helps to identify the problem
Attachments
qlcplus-4.10.pcapng.txt
(65.25 KiB) Downloaded 81 times
qlcplus-4.8.5.pcapng.txt
(241.86 KiB) Downloaded 99 times
User avatar
mcallegari
Posts: 4876
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Thank you very much Santiago.
The traces show indeed a difference of bytes after the OSC path.
In QLC+ 4.8.5 there are four zeroes after /0/dmx/0, while on QLC+ 4.10.2 there is none.
Most likely it is wrong according to the OSC specifications.

Please try this.
Change this line:
https://github.com/mcallegari/qlcplus/b ... er.cpp#L45

Like this one:
https://github.com/mcallegari/qlcplus/b ... er.cpp#L70

And see if it works.
User avatar
sbenejam
Posts: 625
Joined: Sun Apr 12, 2015 6:28 pm
Location: Spain
Real Name: Santiago Benejam Torres
Contact:

It works. ;-)
Changed the line compiled qlcplus 4.10.3 GIT. Now works ok.

Thanks Massimo.
User avatar
sbenejam
Posts: 625
Joined: Sun Apr 12, 2015 6:28 pm
Location: Spain
Real Name: Santiago Benejam Torres
Contact:

One more question on this topic. In qlcplus 4.8.5 the values sent are between 0.0 - 1.0 in qlcplus 4.10.3 are 0.0 - 255.0.

Is this correct?.
User avatar
mcallegari
Posts: 4876
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Uhm...well, technically a float number can range between 0 and 255, but if QLC+ 4.8.5 (which used liblo) ranged from 0 to 1.0, then we should probably go back to that behaviour.

I'll come up with a fix as soon as I can
plugz
Posts: 637
Joined: Sun Apr 12, 2015 6:30 pm
Real Name: David

mcallegari wrote:I'll come up with a fix as soon as I can
Done.
User avatar
sbenejam
Posts: 625
Joined: Sun Apr 12, 2015 6:28 pm
Location: Spain
Real Name: Santiago Benejam Torres
Contact:

Tested, works ok.
I will publish later a python script that can be used to convert QLC+ OSC output to OSC strings to control other programs, for example non-mixer.
Post Reply