This was originally posted to https://github.com/mcallegari/qlcplus/issues/715 - which was the wrong place.
I am trying to get TouchOSC working with the OSC plugin.
The problem I am encountering is getting a QLC button to fire when sent an OSC command.
I am sure I have all of the network configuration working.
This screen shot (output.png) shows that packets are being received - the count increments whenever I hit a button on TouchOSC.
I figure that count is being incremented by OSCController::processPendingPackets, line 388.
I have a VC button configured to receive the message, see image button.png.
I have verified that "/2/toggle2" is being transmitted via another program. I haven't figure out what the "50239" is. Is it the hash?
No specific messages are showing up in the debug output ... but all of the qDebug lines in the key method are commented out.
I am seeing some universe error messages in the debug output, but don't know if it is relevant or not.
Massimo suggested that there was indeed a problem with Universe 5 which is the OSC universe.
Plugz asked some questions:
What is the program sending OSC ? - TouchOSC - version information below.
What type of OSC messages is it sending ? (int or float or whatever) - I was sending "/2/toggle2", but I don't know the payload datatype. It would be a good thing to add to the QLC+ plugin debug messages.
Is the joystick icon showing when you send OSC messages to QLC+ ? - I think you are referring to the dot in the corner of the TouchOSC interface. So yes, the green light flashes. Also the message count on QLC increases everytime I press the button.
./qlcplus -d
Q Light Controller Plus version 4.10.1
This program is licensed under the terms of the Apache 2.0 license.
Copyright (c) Heikki Junnila (hjunnila@users.sf.net)
Copyright (c) Massimo Callegari (massimocallegari@yahoo.it)
bool QLCFixtureDefCache::loadMap(const QDir &) Unknown Fixture Map tag: "FixturesMap"
bool QLCFixtureDefCache::loadMap(const QDir &) Unknown Fixture Map tag: ""
void IOPluginCache::load(const QDir &) "libolaio.dylib" doesn't contain an I/O plugin: "Cannot load library /Applications/QLC+.app/Contents/PlugIns/libolaio.dylib: (dlopen(/Applications/QLC+.app/Contents/PlugIns/libolaio.dylib, 5): Library not loaded: /opt/local/lib/libolaserver.0.dylib\n Referenced from: /Applications/QLC+.app/Contents/PlugIns/libolaio.dylib\n Reason: image not found)"
libpng warning: iCCP: known incorrect sRGB profile
InputPatch *InputOutputMap::inputPatch(quint32) const Universe 5 out of bounds.
OutputPatch *InputOutputMap::outputPatch(quint32) const Universe 5 out of bounds.
OutputPatch *InputOutputMap::feedbackPatch(quint32) const Universe 5 out of bounds.
----- Version Information ----
QLC+: 4.10.1 running on OSX: 10,11,1
TouchOSC v1.9.5 running on iOS 9.2 on iPhone 6.
For debugging purposes i used the program "oscP5sendReceive.pde" with modifications to IP and Port. Using this program I could confirm that my laptop was receivign the OSC messages from touchOSC. And with a different config I could also independently transmit OSC messages to QLC+. Using either TouchOSC or oscP5sendReceive I can see the message counts increment in QLC+.
My qxw file is here https://www.dropbox.com/s/fnzva1f299ofc ... b.qxw?dl=0
Not Responding to External OSC input
- mcallegari
- Posts: 4827
- Joined: Sun Apr 12, 2015 9:09 am
- Location: Italy
- Real Name: Massimo Callegari
- Contact:
Yes, it's the hash used internally by the QLC+ OSC plugin. You don't need to worry about it.I have verified that "/2/toggle2" is being transmitted via another program. I haven't figure out what the "50239" is. Is it the hash?
No. He is referring the the joystick icon that appears beside a universe in the Input Outut panel.Is the joystick icon showing when you send OSC messages to QLC+ ? - I think you are referring to the dot in the corner of the TouchOSC interface. So yes, the green light flashes. Also the message count on QLC increases everytime I press the button.
See my video tutorial #1: https://www.youtube.com/watch?v=I9bccwcYQpM
And apparently you haven't investigated around it.Massimo suggested that there was indeed a problem with Universe 5 which is the OSC universe.
Your project has this mapping:
Code: Select all
<InputOutputMap>
<Universe Name="UAC" Passthrough="False" ID="0"/>
<Universe Name="osc" Passthrough="False" ID="5">
<Input Line="1" Profile="Touch OSC Mix 16" Plugin="OSC"/>
</Universe>
</InputOutputMap>
I'd say if you change the ID of the "osc" universe to "1" then it should work.
In any case this is indeed a usage case worth to be investigated as there is a discrepancy between universe indices and IDs.
- mcallegari
- Posts: 4827
- Joined: Sun Apr 12, 2015 9:09 am
- Location: Italy
- Real Name: Massimo Callegari
- Contact:
Yeah. When I introduced the possibility to add/remove universes I gave each universe an ID like we do in many other classes.plugz wrote:FYI as I encountered a crash related to this today, I'm working on a fix.mcallegari wrote: In any case this is indeed a usage case worth to be investigated as there is a discrepancy between universe indices and IDs.
Problem is that some methods work by index and some others work by ID. This is not good, and the troubles indeed come out when deleting middle universes
-
- Posts: 637
- Joined: Sun Apr 12, 2015 6:30 pm
- Real Name: David
I'm working on a "ID only, no more index" fix, this will make things more clear and less error-pronemcallegari wrote:Yeah. When I introduced the possibility to add/remove universes I gave each universe an ID like we do in many other classes.plugz wrote:FYI as I encountered a crash related to this today, I'm working on a fix.mcallegari wrote: In any case this is indeed a usage case worth to be investigated as there is a discrepancy between universe indices and IDs.
Problem is that some methods work by index and some others work by ID. This is not good, and the troubles indeed come out when deleting middle universes
-
- Posts: 703
- Joined: Mon Nov 02, 2015 11:03 am
- Location: Germany
- Real Name: Lukas
I really like the idea of clear universe-IDs. That was a huge problem for me when I started to work with QLC+ as a newbie.plugz wrote:
I'm working on a "ID only, no more index" fix, this will make things more clear and less error-prone
What was also a problem for me when working with the Enttec ODE device was the fact that their universes start with the ID 0, but the shown index is 1. That's a bit tricky to find out when you're new to the software.
-
- Posts: 6
- Joined: Tue Dec 15, 2015 2:40 pm
- Real Name: Terry
I edited the file and changed the ID to 1. The error messages does not appear now.
Yes, the joystick icon appears when I send an OSC command .
Also when cnfiguring the external input and go into auto detect mode it does detect the external input. It did not do that before.
But still the qlc button does not activate on when sent the OSC trigger.
Yes, the joystick icon appears when I send an OSC command .
Also when cnfiguring the external input and go into auto detect mode it does detect the external input. It did not do that before.
But still the qlc button does not activate on when sent the OSC trigger.
- mcallegari
- Posts: 4827
- Joined: Sun Apr 12, 2015 9:09 am
- Location: Italy
- Real Name: Massimo Callegari
- Contact:
Be extremely careful with plugins, cause I think they use indices and not IDs.plugz wrote:I'm working on a "ID only, no more index" fix, this will make things more clear and less error-prone
For example the ArtNet plugin by default use the universe index to build the default transmission IP.
In this case if you have 5 universes and then delete 2-3-4, then universe 5 becomes universe 2 and the ArtNet plugin should transmit on x.x.x.2 and not x.x.x.5.
(correct me if I'm wrong)
To have a minimum impact on the code, I'd rather add some helper functions to retrieve an ID from an index and vice-versa.
Likewise what we have to map Fixtures IDs on DMX addresses. I think a QVector<quint32> could do the trick, where the size represents the indices and the content are universe IDs.
-
- Posts: 637
- Joined: Sun Apr 12, 2015 6:30 pm
- Real Name: David
Hi,donert wrote: It is working now. Not sure what has caused the change. I changed networks so had to change my IP addresses and i also restarted QLC, but even so, it was seeing the network traffic before too.
Thanks for all your help.
Can you share your workspace now ? Maybe we can find why it works
I don't think there is any reference to "universe id" or to "universe index" in the plugins. Example: in the ArtNet plugin, It's all called "universe". This is confusing that's what I want to avoid by replacing all indexes with IDs.mcallegari wrote:Be extremely careful with plugins, cause I think they use indices and not IDs.plugz wrote:I'm working on a "ID only, no more index" fix, this will make things more clear and less error-prone
For example the ArtNet plugin by default use the universe index to build the default transmission IP.
In this case if you have 5 universes and then delete 2-3-4, then universe 5 becomes universe 2 and the ArtNet plugin should transmit on x.x.x.2 and not x.x.x.5.
(correct me if I'm wrong)
I think in this case an easy solution now is problems in the future.To have a minimum impact on the code, I'd rather add some helper functions to retrieve an ID from an index and vice-versa.
It's not exactly the same. A universe contains 512 channels, period. So it's easy to map each channel to the corresponding fixture id.Likewise what we have to map Fixtures IDs on DMX addresses. I think a QVector<quint32> could do the trick, where the size represents the indices and the content are universe IDs.
A universe list contains between '0' and 'a truckload' of universes, its size is variable.
Also, it can be useful to know which fixture is at which address. A universe index has no purpose, it should be hidden in the InputOutputMap and not accessible from the other places.
Don't worry it's not that big of a change