# BU16 "global" Button with DAW state at page change

**URL:** <https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929>\
**Category:** Grid\
**Tags:** ableton\
**Created:** [October 7, 2026, 11:12pm UTC](https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929 "2026-10-07T23:12:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![user290](https://forum.intech.studio/letter_avatar_proxy/v4/letter/u/eb9ed0/32.png) [@user290](https://forum.intech.studio/u/user290)\
**Post date:** [October 7, 2026, 11:12pm UTC](https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929/1 "2026-10-07T23:12:08Z")

</div>

Hello! On my BU16 I want to have a “global” Button across all 4 pages. (It has to be on each page, cause I need very quick access) I can apply the same CC# for the Button on each page and map it on, let’s say, a Track Mute switch in Ableton.

Now here is the problem:

1. Page 1 → I press Button → Track is unmuted → Button LED turns on
2. loading Page 2 → Button LED is off by initial load, hence doesn’t show the correct Track Mute state
3. Page 2 → I press Button twice → Button LED on and then off again → Track is muted
4. re-loading Page 1 → Button LED is remembered as on from before, hence doesn’t show the correct Track Mute state

I need to receive the DAW state each time I change pages, I suppose. How do I do that? Or is there another easier way to solve this?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![narayb](https://forum.intech.studio/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@narayb](https://forum.intech.studio/u/narayb)\
**Post date:** [October 8, 2026, 10:34am UTC](https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929/2 "2026-10-08T10:34:26Z")

</div>

There’s two ways to do this:

1. You create an actual global variable that lives in a library outside of Page memory and you call that and modify that on each Page when you access it.
2. You don’t use actual Pages, but just create 4 Pages within 1 Page and leave that button out of these faux-Pages.

Creating either of these is possible, but would need some work provided you’re comfortable scripting in LUA.

But if you need some help, let me know!

---

<div class="post-metadata">

**Author:** ![user290](https://forum.intech.studio/letter_avatar_proxy/v4/letter/u/eb9ed0/32.png) [@user290](https://forum.intech.studio/u/user290)\
**Post date:** [October 8, 2026, 12:40pm UTC](https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929/3 "2026-10-08T12:40:48Z")

</div>

Hey Narayb, thanks for the quick reply! I’m happy to read there are ways to do this.

I know programming a little bit, but so far did the Grid coding with AI help only.

Regarding 1: Could you give a simple code example maybe, if not too much effort?

Regarding 2: I don’t understand this. What’s a faux page and how would I access it?

Cheers!

---

<div class="post-metadata">

**Author:** ![narayb](https://forum.intech.studio/letter_avatar_proxy/v4/letter/n/b2d939/32.png) [@narayb](https://forum.intech.studio/u/narayb)\
**Post date:** [October 8, 2026, 1:01pm UTC](https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929/4 "2026-10-08T13:01:09Z")

</div>

Oh, cool!

AI can help by explaining and writing code in these cases so that’s a good start!

For solution 1:  
This might be the simpler solution. In Editor there’s an option in the sidebar called the File Manager. This allows you to create files that exist outside of Pages. For example creating the file `globals.lua` and then making that file a library like this:

```lua
local globals = {
MY_GLOBAL = 0
}
return globals

```

After this, you will be able to require this library on any Page (any you will have to do that on all Pages, best practice would be to do it on System/Setup) like this:

```lua
G = require("globals")

```

And after this you can write to or read from this library like so:

```lua
print(G.MY_GLOBAL)
G.MY_GLOBAL = G.MY_GLOBAL + 1
print(G.MY_GLOBAL)

```

For solution 2:  
Check out the Profile called 64CTRL (Workflow folder)/256CTRL (Community folder) in the Profile Cloud, as both of these use 4/16 “faux” Pages you can switch between. This is a more complex solution, but AI could figure it out from the json files I think.

But in any case, if you run into any trouble, let me know and I’ll try to help.

---

<div class="post-metadata">

**Author:** ![user290](https://forum.intech.studio/letter_avatar_proxy/v4/letter/u/eb9ed0/32.png) [@user290](https://forum.intech.studio/u/user290)\
**Post date:** [October 9, 2026, 12:56am UTC](https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929/5 "2026-10-09T00:56:32Z")

</div>

Trying to get to work solution 1. But failing. I create globals.lua which contains:  
local globals = {  
SWITCH1 = 64,  
SWITCH2 = 64,  
SWITCH3 = 64  
}  
return globals

In the System/Setup of page 1 and 2 I type:  
G = require(“globals”)

On Switch 1 I add a Code-Action:

print(“Switch 1”)

print(G.SWITCH1)

G.SWITCH1 = G.SWITCH1 + 1

print(G.SWITCH1)

And this happens:

I press Switch 1 on Page 1:

[-2,0] Switch 1  
[-2,0] 65.000000  
[-2,0] 66.000000

I change to page 2 by pressing a completely different button which runs a page\_load(1). I didn’t press Switch 1 yet, but already receive another:

[-2,0] Switch 1  
[-2,0] 64.000000  
[-2,0] 65.000000

Then I do press Switch 1, which causes this:

[-2,0] Switch 1  
[-2,0] 65.000000  
[-2,0] 66.000000

What’s wrong?

---

<div class="post-metadata">

**Author:** ![user290](https://forum.intech.studio/letter_avatar_proxy/v4/letter/u/eb9ed0/32.png) [@user290](https://forum.intech.studio/u/user290)\
**Post date:** [November 4, 2026, 2:18pm UTC](https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929/6 "2026-11-04T14:18:22Z")

</div>

In other words:

Global variables don’t work (like that).

---

<div class="post-metadata">

**Author:** ![cjselbyspink](https://forum.intech.studio/user_avatar/forum.intech.studio/cjselbyspink/32/569_2.png) [@cjselbyspink](https://forum.intech.studio/u/cjselbyspink)\
**Post date:** [November 20, 2026, 2:56pm UTC](https://forum.intech.studio/t/bu16-global-button-with-daw-state-at-page-change/929/7 "2026-11-20T14:56:07Z")

</div>

I hit the same two things building a six-module Lightroom board, so in case it helps:

1. Your “Switch 1” print firing on the page change without a press: code in a Button event isn’t only run by a press. I saw it run on release as well, and events also fire once when a page loads. Wrapping the action in a press check fixed it for me:

if self:button\_state() \> 0 then  
– your code  
end

1. The value going back to 64: from your log it looks as if the library is loaded afresh when the page changes, so anything held on the module starts again. I gave up trying to keep state on the board for that reason.

What worked for me was treating the computer as the only source of truth. The key sends its command, but its LED is never set by the press. The LED is set only by what comes back from the host, and in Setup on every page I ask the host for its current state, so each page lights correctly as it loads. For you that would mean lighting the LED from the incoming CC in a midirx\_cb assigned in Setup, not from the button press. I don’t use Ableton, so I can’t tell you how to make it resend the mute state on a page change. That’s the missing piece.

I’m writing up the whole build and will post it here shortly.
