Why I ended up having several MacroPages for each Midi Module and Layers?

My program has several Lua Midi Modules and a bunch of nested Layers with zones. And as I click each of them I see in a MacroPage window different GUI layouts. Well these GUIs are the same by elements, but differ in values (positions) of GUI elements. In the same time I can create a blank MacroPage for any Layer or Midi Module. How this can be? I thought one Program could have only one MacroPage.

And the main problem with this is that I can’t see as a particular slider on the GUI (let’s call it Volume) is changing Level parameter on a particular layer (say number 16). Their connection is provided like this in my script:

defineParameter(“volume_slider”, nil, 0, -100, 12, 0.1,function() volume_slider_changed() end)

function volume_slider_changed()

I expected that when I touch volume_slider on the GUI and look at the Level parameter in the Parameter List while layer #16 is highlighted I must see Level changing. But it’s not. And I’m a bit perplexed what’s happening.

Yes, you can do that. However it’s only useful in Halion 6. If you want to create a library for Halion Sonic (SE) only the topmost layer should have macro page. Simply because you cannot access the midi modules or nested layers so there is no point in creating macro pages for them.

Your volume slider function itself looks OK to me. Are you sure layers[group_1] is the one you expect? If so you should see the Level parameter change. Not sure about the range though. I think the min is -96.

Another thing to consider with level faders, sliders, knobs… they often use logarithmic curve so you get more precision around unity. If you create a numeric parameter like in your example the range is linear. But it should still work, if that’s what you want.

I am sure that Level parameter and volume slider on the GUI worked previously. However now as I “discovered” several MacroPages existing something happened and GUI slider is not connected anymore with the related Level parameter.

So this is what I have for the present

3 Midi Modules with scripts: the upper one contains main script, the second and the third one just have an auxiliary short scripts, say, to read layers’ sequential numbers, etc. In the bottom of it all sits “Main” layer with a bunch of nested layers.

Now I’ve kept a MacroPage only for an upper Midi Module called “Main Script”, making other MacroPages blank.

With such setup I want to check visually if a volume slider on the GUI indeed controls Level Parameter of layer #16, which is nested inside “Main” layer. I open Parameter List window, click layer #16 and see a blank MacroPage for it, so I can’t move the volume slider because it is sits on the MacroPage belonging to “Main Script” Midi Module.

I suspect somewhere here the issue takes it origin. Looks like a MacroPage I have built doesn’t send anything to “Main” layer (or its nested layers).

I know, it gets confusing when having more macro pages. I would delete all macro pages and only use one attached to the program layer (v32) and not to the script module. If you are going to export the instrument as HSSE layer then having macro page attached to script module will not be accessible.

If you want you can upload the preset (without samples). I can take a look at it.

Hmmmm… If I delete MacroPage belonging to “Main Script” I can’t drag and drop customer parameters declared and used in this script to GUI elements as they all belong to MacroPage attached to Program layer “v32”?

You should be able to connect script parameters just fine, even if the macro page is attached to the program layer.

I can’t do it (at least by drag-n-drop) because in order to see the MacroPage I must select the Program layer. But when I select it, all the custom parameters disappear from Parameter List, substituted by factory parameters of the Program layer.

Do you have the MacroPage Designer Extended layout open? The parameter list will show the parameters of currently selected element in program tree. That’s expected behaviour.

But you should still see the macro page even if you select other elements in program tree.

At least that’s how it works if you only have one macro page.

That’s my exact issue. MacroPage changes also if I select any other element in Program tree. See the screenshot (it’s from MacroPage Designer Extended view). E.g. I’ve selected “Main Script” layer and its MacroPage is blank.

In contrast to that if I select Program “v32” I can see all GUI elements on MacroPage, but I can’t access the custom parameters in Parameter List.

I see. Delete the macro page of the script module. On the screenshot it looks like it’s empty but get rid of it completely.

Then you should see your main macro page even if the script module is selected.

Never would guess that it can cause so many troubles) Now it all works, I’ve been able to connect parameters and GUI elements via drag-n-drop. And Level is controlled now by the volume slider as it should. Thanks a lot for your patience with a newbie!