Call global static variable or function

Discuss Lemur and share techniques.
Post Reply
Bonobo
Newbie
Posts:8
Joined:18 Sep 2017 16:15
Call global static variable or function

Post by Bonobo » 18 Sep 2017 17:04

Hey folks !

I´ve set a number of global variables for ctlout and midiout in which I store the on/off state of devices.

Code: Select all

decl fx_delay_off = ctlout(0,83,0,16);
decl fx_delay_on = ctlout(0,83,127,16);
This is to have a single place where I can define the midi-channel of a device and to change it for all pad scripts in 1 place if the midi channel for the device changes.

I would now like to call this variable on a pad for the "on expression(x)" akak button press.
I cannot find any reference in the documentation there.

I could of course simply store the values for the channels in form of decl ch_delay = 16
and on pad press call ctlout(0,83,ch_delay)
but storing the entire CTL-expression is far more elegant.

Is there a way to call global variables on pad press and have the result execute
or turn the ctl expression into a function that can be called on button press ?

Something like:
Pad -> on expression (x)
fx_delay_off()

Thanks for your thoughts !
Joe

janiliamilanes
Newbie
Posts:15
Joined:25 Feb 2017 18:22

Re: Call global static variable or function

Post by janiliamilanes » 31 Oct 2017 20:11

If you creating an expression higher in the hierarchy the objects under will see it,
Attachments
Global.jzml
(650Bytes)Downloaded 72 times

Post Reply