to share data between components, you could use the table-reference that is passed as third argument to all components of a plugin:
Posts by Andreas
BECOME PART OF THE COMMUNITY - Sign up here
-
-
avoiding globals and keeping execution within the Lua engine would be preferable yes.
here's an approach that avoids both globals and invoking the commandline interpreter:
Code
Display Morelocal function myecho(str) for i=1,5 do Echo(str) coroutine.yield(0.5) end end local function outsource(func, ...) local args = {...} Timer(function() return func(table.unpack(args)) end, 0, 1) end return function() Echo('same coroutine:') myecho('hello') myecho('world') Echo('different coroutines:') outsource(myecho, 'hello') outsource(myecho, 'world') end
-
Two issues:
1) The string concatenation isn't working correctly.
2) Illegal Property "command"
1. don't use equal sign in the variable assignment
2. quote the recall of the variable
+ address the cuepart (of the current cue), to prevent value to be directed to all cues if no current cue exists (the sequence is off)
SetUserVariable NewBPM ("Enter Speed Master BPM")
SetUserVariable BpmCmd "Master 3.1 at BPM "$"NewBPM"
Set Part 0 Property "Command" $"BpmCmd"
For instance I'm trying to create a macro to help setting a speed master on the first cue of a song.
Set Cue "CueZero" Property "Command" "Master 3.1 at BPM "("Enter Speed Master BPM")
Desired workflow.
1) Press the desired Command column field on the desired cue.
2) Press the macro preset.
3) Type a speed value. (example:123)
4) Press Enter and done.
Plausible workflow:
1) Press the macro preset
2) Press the desired cue in the seq sheet, any field (or type cue x)
3) Type a speed value. (example:123)
4) Press Enter and done.
ChangeDestination [Execute = No]
Set 0 Property "Command" "Master 3.1 at BPM "("Enter Speed Master BPM")
ChangeDestination Root
-
-
-
be aware that the actual currentpage of a station may also change when another datapool is selected, or a different user logs on.
Code
Display Morelocal plugin = select(4, ...):Parent() local currentprofile, currentpage local pagehook = function(obj) local page = CurrentExecPage() if page ~= currentpage then currentpage = page Printf('New currentpage detected:'..currentpage.Name) end end local profilehook = function(obj) if obj.Profile ~= currentprofile then currentprofile = obj.Profile pagehook(currentprofile) Echo('New currentprofile detected, moving pagehook to userprofile '..currentprofile.Name) UnhookMultiple(pagehook) HookObjectChange(pagehook, currentprofile, plugin) end end return function() HookObjectChange(profilehook, CmdObj(), plugin) HookObjectChange(pagehook, CurrentProfile(), plugin) end
-
-
try
Copy Preset 4."WHITE" At Preset 4."CFX1" "CFX1" /Overwrite /NoOops -
please note that the selectiongrid information is brought into the programmer when attributes are given values
the current selection and selectiongrid has no relevance in the moment of storing the preset.
you need to transpose the grid before applying the colors
-
yes, the bounce effect is calculated based on the x-positions in the selectiongrid
use the transpose tool in the Selection grid before running the plugin, if you want to bounce in the Y axis
Selection Grid - grandMA3 User Manual - Help pages of MA Lighting International GmbH
-
in my experience TextAutoAdjust only will reduce the font-size if there is not enough space even after wrapping.
If this is an issue for you, wrap manually by including linebreaks (/n) in the text string
Code
Display Morereturn function() local w, h = 150, 100 local ol = GetFocusDisplay().ScreenOverlay ol:ClearUIChildren() local bi = ol:Append('BaseInput') bi.W, bi.H, bi.Columns = w*4, h, 4 local el = bi:Append('UIObject') el.W, el.H, el.Anchors = w, h, '0,0' el.Text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit' local el = bi:Append('UIObject') el.W, el.H, el.Anchors = w, h, '1,0' el.Text = 'Lorem ipsum \ndolor sit amet,\n consectetur \nadipiscing elit' local el = bi:Append('UIObject') el.W, el.H, el.Anchors = w, h, '2,0' el.Text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit' el.TextAutoAdjust = 'Yes' local el = bi:Append('UIObject') el.W, el.H, el.Anchors = w, h, '3,0' el.Text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua' el.TextAutoAdjust = 'Yes' end
-
try a small Lua loop via commandline to set different values to a range of elements e.g.
Lua "for i, element in ipairs(ObjectList('Layout 7.1 Thru 10')) do element.PosX = i * 100 end"
-
Delete ScreenContent 1.*
Store ScreenContent 1.1 Property "Name" "WindowLayoutView" "X" 0 "Y" 0 "W" 16 "H" 12
Store ScreenContent 1.2 Property "Name" "WindowLayoutPool" "X" 0 "Y" 12 "W" 16 "H" 2
-
from your posts, it seemed like you knew how to use the Lua function CmdIndirectWait('comandline syntax goes here')
e.g. your lua code CmdIndirectWait('MAtricks "X/ w2"') and CmdIndirectWait('Highlight On')
as apparently this is not the case, try the following Lua code:
CmdIndirectWait('Set Selection MAtricks "XWings" 2')
-
if you want to set this property via regular names or numbers, use the format "x.Layouts.y"
where x is datapool name or number, and y is layout name or number
e,g
Set ScreenContent 1.1.1 Property "Layout" "Default.Layouts.My nice Layout"
-
"Link Values" is not relevant for applying Fade or Delay
"Link Timing" is what you are looking for:
Encoder Toolbar - grandMA3 User Manual - Help pages of MA Lighting International GmbH
-
-
-
Where can I learn more about: ObjectList('Sequence 6 Cue 1')[1]?
ObjectList - grandMA3 User Manual - Help pages of MA Lighting International GmbH
-
try something like this:
local obj = ObjectList('Sequence 6 Cue 1')[1]
obj.Note = obj.Note.." add note"