Switching pages without iniatilize them?

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! :raised_hands:

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!

1 Like

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!

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)

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

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

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!

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:

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.

1 Like

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

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

Thanks in advance for any light on this!

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

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.

1 Like

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!

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

Hopefully it works for you too!