Globals that aren't so global: scene locals, folders and sharing
Posted: Wed Nov 11, 2026 9:49 pm
In my Globals panel in any project I've used for a while you'll find a long list: Iterator counts, timers, audio bands, expression intermediates, alongside lots of repeats, each one created for a single scene, and all of them sitting side by side with just a handful of values that really do belong to the whole project. Crazy Dave put it most succinctly:
Globals have come a long way (Expressions in 2.11, faster handling of "large numbers of globals" in 2.32, renames that follow through to expressions in 3.0). The 2.32 note is evidence that people use a lot of them. What follows is about making globals more accessible, manageable and intuitive as projects grow.
Globals are already the answer
When someone asks how to drive many parameters from one value, the answer on this forum, devs included, is a Global ("it might be best to use a Global", t2233; "Create one global that is your main 'switch'", t1321). I give the same advice. Globals keep values in sync, document the numbers that matter, and feed expressions. That success is exactly why the list gets long.
Locals
Most entries in a big project's Globals panel only matter inside one scene. Sorting them out roughly:
You'd already named the solution:
It has come up repeatedly since Jojo's "(global and local) variables" in 2015 (t261), including my own t1130 in 2017, which you called "a pretty good idea".
Locals could also follow the life of their scene. An Increase modifier on a single parameter already restarts with the scene. A scene timer held as a local could do the same, and could also be linked from any number of parameters and used in expressions. Two users have run into exactly this: artnik found that globals "kept counting their input from frame 1, as opposed to scene start" (GD, 2017), and mcornholio built a project-wide "time" global so his expressions could know "the time passed since scene started" (GD, 2018).
Folders
Even with locals, a project's globals deserve some order. Folders in the Globals panel, as in the Scene Group panel, were asked for in t1751, where you mentioned "related things in our pipeline", and reGeneraTed added: "I have quite a few globals and having a way to keep them bunched-up and organized would help a lot!!"
Just this week, rdrt asked for the Globals panel to be resizable because most of the names can't be read at its fixed width (t3599). A wider panel would help straight away. Folders and locals would help further: much of a global's name is there only to say where it belongs. With the folder or scene carrying that context, "Tunnel_Iterator_Count" can simply be "Count" inside Tunnel.
A scene's own controls
In most scenes there are many modules and even more parameters, but only a few are important to the scene's development and look. It's a challenge remembering which ones they are, and then finding them, especially live. I already work round this by linking those parameters to globals so I can reach them from the Globals panel, but that puts every scene's key controls into one project-wide list.
Exposed locals would gather those few values per scene: mark a local as exposed and it appears with the scene's other key controls in one place. That's useful in every scene, whether or not it's ever used inside another.
This is a different thing from the live status display discussed in t1110 (FPS, playback time, BPM, memory, MIDI assignments), which you described as "very useful" alongside your own idea of a "Console" window. That shows what Magic is doing; this gathers what I want to change. The two could meet, though: a scene's controls showing their live values would cover some of the same ground.
When the scene is used as a Scene module, its exposed locals become per-instance parameters, so one scene can appear several times with different settings. Terry described the split:
New users meet the need quickly: WoodlandSpirit found that to use a scene twice with small differences, "the only feasible way is to duplicate the scene" (t2541). Duplicates drift apart; a parameterised scene stays one scene.
Taking globals to another project
Today, reusing a scene and its globals elsewhere goes like this:
With folders, a set of globals (BPM and LFOs, a palette, controller mappings) could be exported and imported as one item. When a name clashes, a choice to keep the existing global, replace it or keep both would avoid the suffixes, and the same choice would help Import Project generally. Folder names could also act as namespaces in expressions (Palette.Hue, Strobe.Hue), so clashes become rarer to begin with.
Where is it used?
Finding where a global is used is part of a wider need: finding where a piece of media is used, which scenes have errors, or where that well-configured ISF lives so it can be reused. Parts of this have been asked for in t1809, t1851, t2949, t2658 and t3222, and it probably deserves a post of its own. For globals, a "Used by" list with jump-to is the piece that belongs here, along with a "Remove unused globals" to match Remove Unused Inputs.
So, another mega bump which, fingers crossed might make it into version 3 at some stage and in some form.
Sadler
t3179, Sep 2024CrazyDave303 wrote:I want to have Globals that aren't so Global.
Globals have come a long way (Expressions in 2.11, faster handling of "large numbers of globals" in 2.32, renames that follow through to expressions in 3.0). The 2.32 note is evidence that people use a lot of them. What follows is about making globals more accessible, manageable and intuitive as projects grow.
Globals are already the answer
When someone asks how to drive many parameters from one value, the answer on this forum, devs included, is a Global ("it might be best to use a Global", t2233; "Create one global that is your main 'switch'", t1321). I give the same advice. Globals keep values in sync, document the numbers that matter, and feed expressions. That success is exactly why the list gets long.
Locals
Most entries in a big project's Globals panel only matter inside one scene. Sorting them out roughly:
- Truly global: constants ExprTk doesn't provide (phi, tau), master BPM and beat phase, master brightness, a show-wide intensity level, the show's colour palette.
- Really scene-specific: Iterator and other counts and indexes (such as the line index into a TextFile of lyrics), values shared by linked parameters within the scene, intermediate expression calculations, scene timers, and the audio bands the scene responds to.
You'd already named the solution:
t1693, Aug 2018Magic wrote:I was planning on having a new category called "Locals", which are Globals but only for one scene
It has come up repeatedly since Jojo's "(global and local) variables" in 2015 (t261), including my own t1130 in 2017, which you called "a pretty good idea".
Locals could also follow the life of their scene. An Increase modifier on a single parameter already restarts with the scene. A scene timer held as a local could do the same, and could also be linked from any number of parameters and used in expressions. Two users have run into exactly this: artnik found that globals "kept counting their input from frame 1, as opposed to scene start" (GD, 2017), and mcornholio built a project-wide "time" global so his expressions could know "the time passed since scene started" (GD, 2018).
Folders
Even with locals, a project's globals deserve some order. Folders in the Globals panel, as in the Scene Group panel, were asked for in t1751, where you mentioned "related things in our pipeline", and reGeneraTed added: "I have quite a few globals and having a way to keep them bunched-up and organized would help a lot!!"
Just this week, rdrt asked for the Globals panel to be resizable because most of the names can't be read at its fixed width (t3599). A wider panel would help straight away. Folders and locals would help further: much of a global's name is there only to say where it belongs. With the folder or scene carrying that context, "Tunnel_Iterator_Count" can simply be "Count" inside Tunnel.
A scene's own controls
In most scenes there are many modules and even more parameters, but only a few are important to the scene's development and look. It's a challenge remembering which ones they are, and then finding them, especially live. I already work round this by linking those parameters to globals so I can reach them from the Globals panel, but that puts every scene's key controls into one project-wide list.
Exposed locals would gather those few values per scene: mark a local as exposed and it appears with the scene's other key controls in one place. That's useful in every scene, whether or not it's ever used inside another.
This is a different thing from the live status display discussed in t1110 (FPS, playback time, BPM, memory, MIDI assignments), which you described as "very useful" alongside your own idea of a "Console" window. That shows what Magic is doing; this gathers what I want to change. The two could meet, though: a scene's controls showing their live values would cover some of the same ground.
When the scene is used as a Scene module, its exposed locals become per-instance parameters, so one scene can appear several times with different settings. Terry described the split:
t1130, Sep 2017Terry Payman wrote:I see benefit in a distinction between Scene parameters and Scene locals. Only the parameters would be exposed at the higher module level (with their defaults defined at scene level).
New users meet the need quickly: WoodlandSpirit found that to use a scene twice with small differences, "the only feasible way is to duplicate the scene" (t2541). Duplicates drift apart; a parameterised scene stays one scene.
Taking globals to another project
Today, reusing a scene and its globals elsewhere goes like this:
- Save the scene to its own project.
- Open that project and delete or rename the globals you don't want to bring across.
- Import it into the target project.
- Tidy up any names that clashed and arrived with a "1" suffix.
With folders, a set of globals (BPM and LFOs, a palette, controller mappings) could be exported and imported as one item. When a name clashes, a choice to keep the existing global, replace it or keep both would avoid the suffixes, and the same choice would help Import Project generally. Folder names could also act as namespaces in expressions (Palette.Hue, Strobe.Hue), so clashes become rarer to begin with.
Where is it used?
Finding where a global is used is part of a wider need: finding where a piece of media is used, which scenes have errors, or where that well-configured ISF lives so it can be reused. Parts of this have been asked for in t1809, t1851, t2949, t2658 and t3222, and it probably deserves a post of its own. For globals, a "Used by" list with jump-to is the piece that belongs here, along with a "Remove unused globals" to match Remove Unused Inputs.
So, another mega bump which, fingers crossed might make it into version 3 at some stage and in some form.
Sadler