# Switching pages without iniatilize them?

**URL:** <https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402>\
**Category:** The Lounge\
**Created:** [November 27, 2024, 11:31am UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402 "2024-11-27T11:31:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![antblanca](https://forum.intech.studio/user_avatar/forum.intech.studio/antblanca/32/248_2.png) [@antblanca](https://forum.intech.studio/u/antblanca)\
**Post date:** [November 27, 2024, 11:31am UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/1 "2024-11-27T11:31:04Z")

</div>

Hi there!

I was wondering if there is anyway to switch a page but not initializing it, instead I would like to recall the latest values. Here why:

On my BU16, page #1 is dedicated to sample selection, page #2 I’ve made a keyboard matrix with two buttons for octave up/down. Everything works perfectly.

The problem comes when I go to page #1 and then to page #2 again, my octave selection is gone, logically because it recalls my init variable for octave (3). So I need to play again with -+ buttons to find the latest octave that I was playing.

Is there any hidden code trick like using empty variables or something? I’ve found this breaks a little bit my workflow on using and programming some more tools.

What do you think? as usual, many thanks in advance! 🙌

---

<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:** [November 27, 2024, 11:51am UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/2 "2024-11-27T11:51:54Z")

</div>

I would suggest not using Pages then.

Probably the easiest way to do this, would be to retrofit the 64CTRL profile (originally for the EN16) to a BU16 version.

That’s because the 64CTRL profile doesn’t actually use Pages to store variables, but creates variables to store 4 Pages of variables in just one Page! Hope this makes sense…

I’m not really sure how your profile works, but I’ll make a cleaned up version of the 64CTRL for the BU16, to let you do the customization part if it. And if you’d need help with it, I’ll be glad to help!

---

<div class="post-metadata">

**Author:** ![antblanca](https://forum.intech.studio/user_avatar/forum.intech.studio/antblanca/32/248_2.png) [@antblanca](https://forum.intech.studio/u/antblanca)\
**Post date:** [November 27, 2024, 12:21pm UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/3 "2024-11-27T12:21:57Z")

</div>

Hey narayb,

Yes, thanks for the reply!

Yes making my own page system would be nice, I didn’t tried myself because I am not sure if I this will reach the 400 character limit, I have some stuff going on.

I will check the 64CTL , thanks as usual!

---

<div class="post-metadata">

**Author:** ![antblanca](https://forum.intech.studio/user_avatar/forum.intech.studio/antblanca/32/248_2.png) [@antblanca](https://forum.intech.studio/u/antblanca)\
**Post date:** [November 29, 2024, 10:49am UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/4 "2024-11-29T10:49:44Z")

</div>

Hey @narayb,

One question if you don’t mind, can we call functions using the immediate\_send()?

for example, imagine I’ve this function on my first PO16 pot (Setup tab)

```auto
test = function()
  print("do something")
end

```

Then from any BU16 button can we call that function in this way?

```auto
if self:button_state() > 0 then
  immediate_send(nil, nil, 'test()')
end

```

I’ve tried but it seems to freeze Grid-Editor.

I am trying to build my paging system but I’d like to use the BU16 buttons to reload the array based pages.

Thanks a lot in advance!

---

<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:** [November 29, 2024, 11:42am UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/5 "2024-11-29T11:42:27Z")

</div>

You have to have the user function that’s being called also properly defined on each module.

So let’s say you have test function on all modules print their names into the debug monitor:

```lua
function test()
print(hardware_configuration())
end

```

When you put the above on each Init/Setup Event of each module in your Grid, when sending our a Grid-wide message with immediate send as in your own example, you should see each controller printing its HW info into debug monitor.

---

<div class="post-metadata">

**Author:** ![antblanca](https://forum.intech.studio/user_avatar/forum.intech.studio/antblanca/32/248_2.png) [@antblanca](https://forum.intech.studio/u/antblanca)\
**Post date:** [November 30, 2024, 12:57pm UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/6 "2024-11-30T12:57:56Z")

</div>

Hi narayb,

Sorry to bother with this again. If the functions are in both modules, it works when using nil as arguments for immediate\_send() as expected.

But what I would like is to call functions (from the BU16) that exists only on the PO16 module.

The only way I could make it to work is using this line, my PO16 is at the left in the grid and BU16 at the right:

`immediate_send(0, nil, 'prueba()')`

 ![image](https://forum-test.intech.studio/uploads/default/original/1X/499989337f2574bfbcc3cd5c3bbe87c709aea2b0.png)

It works but it also generates an error for [0, 1]

Thanks in advance for any light on this!

---

<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:** [December 2, 2024, 12:00pm UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/7 "2024-12-02T12:00:30Z")

</div>

Sooo, center is always the module that you are sending from. So sending to the left neighbor module would be:

```lua
immediate_send(-1,0,"test()")

```

Immediate send is using a relative indexing system that is different from the `module_position_x()` type functions which refer to an absolute position index.

I hope I didn’t make this more confusing.

---

<div class="post-metadata">

**Author:** ![antblanca](https://forum.intech.studio/user_avatar/forum.intech.studio/antblanca/32/248_2.png) [@antblanca](https://forum.intech.studio/u/antblanca)\
**Post date:** [December 2, 2024, 12:27pm UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/8 "2024-12-02T12:27:48Z")

</div>

thanks narayb,

I remember to set -1 value for that device (just by intuition) and I was having also error or not making anything, I will give a new try as soon as I back home.

Thank you again!

---

<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:** [December 2, 2024, 2:34pm UTC](https://forum.intech.studio/t/switching-pages-without-iniatilize-them/402/9 "2024-12-02T14:34:59Z")

</div>

I just re-read my example and even I made a mistake, now it’s fixed!

Hopefully it works for you too!
