CC being sent when change global var - is this a Lemur bug?

Discuss Lemur and share techniques.
Post Reply
rgames
Newbie
Posts: 20
Joined: 22 Dec 2015 22:43

CC being sent when change global var - is this a Lemur bug?

Post by rgames »

This is baffling me - in the attached example, I have two switch arrays. The larger one on the right is programmed to send CCs for on and off states. This array works fine.

The small array on the left is used to perform operations on the larger array, one of which is to activate all of the switches (the "All Tracks" button). Instead of sending a bunch of CCs when the individual switches are activated, I use a single master CC that is attached to the "All Tracks" button. Therefore, I don't want the individual switches of the larger array to send their CCs when activated by the "All Tracks" button.

To achieve this behavior, I use a global variable (sendLibrariesCC). Before the "All Tracks" button activates the larger array, I set sendLibrariesCC = 0. The onActivate script on the large array sends out CCs only when this flag is 1, so it should not be sending out any CC messages when called by the "All Tracks" button.

Of course, I have to restore sendLibrariesCC=1 after the "All Tracks" action is completed so that the switches in the large array once again respond to user input. However, when I set sendLibrariesCC=1, there is ANOTHER CC value sent out (provided you previously pressed something on the larger array).

I've confirmed this behavior by commenting out the sendLibrariesCC=1 line. When commented out, the project sends only one CC when the "All Tracks" button is activated.

Is this a Lemur bug? Or is there an expected behavior that I'm not aware of?

Thanks in advance - I've spent the better part of two days racking my brain over this and can't figure it out...!

rgames
Attachments
Debug_3Jan2016.jzml
(14.69 KiB) Downloaded 117 times
Post Reply