How do I get GlobalCable value?
-
as the title says....
I created a clock ramp in scriptNode and connected the needed values to global cables. How do I retrieve the values from these cables?
I have one tracking beat ticks and one tracking whole bar progression.
You guessed it im making a playhead and tempo marker. lol.
So with that said, I added a slider to my UI that I am going to later LAF to look like a cool progression bar of some sort.....
Any tips or snips? haha.
Thank You!

My scriptNode setup...

Shown in module tree..

-
update...
I figured it out...
I found the snippet in Docs and modified it for my usage. Yee.
const var rm = Engine.getGlobalRoutingManager(); const var mc = rm.getCable("bars"); const var pnlMasterPlayheadBars = Content.getComponent("pnlMasterPlayheadBars"); pnlMasterPlayheadBars.data.value = 0; mc.registerCallback(function(value) { pnlMasterPlayheadBars.data.value = value; pnlMasterPlayheadBars.repaint(); //Console.print(value); }, AsyncNotification); pnlMasterPlayheadBars.setPaintRoutine(function(g) { var a = this.getLocalBounds(0); g.fillAll(this.get("bgColour")); g.setColour(Colours.withAlpha(this.get("textColour"), 1.0)); var x = a[2] / 100 * (this.data.value * 100); g.drawVerticalLine(x, 0, a[3]); });