How to bypass or turn on script layers?

In my instrument I have three script layers – the first one has my custom script, which produces sounds, and the second and the third ones contain factory FlexPhraser in each of them. I want to control via GUI buttons which one of FlexPhrasers is used (it can be both altogether or both bypassed). Can it be done? How the selection/bypassing of script layers is carried out? Thanks!

Each script module has a Bypass parameter. For flexphraser I believe the parameter is called Enable but you can check that in parameter list.

Edit: Parameter for turning flexphraser on/off is called Active

Thanks a lot! I have a follow-up question. I want those two FlexPhrase modules to work in parallel and independently after a main instrument’s script, which serves a sound source for them. Can it be done with Halion consequent system of layers?

Screenshot might help to understand what you want to do.

Do you mean something like this?


Yes, you can have them working independently. You can turn them on/off. Each of them can play a different phrase or pattern. They will both receive the midi notes passed from the lua script. (Unless you target only one of the layers with playNote in the script)

The signal flow is from top to bottom of the program tree.

My structure is like this:
Main script via PlayNote triggers Main layers, which produce all the sounds of the created instrument accordingly (suses, noises, etc - all the stuff). Now I want to funnel all sounds, originated in Main layers, into Arp1 and Arp2 in parallel. For the present as I’m trying the structure you suggested above, no sound goes to Arps, though they are active and not bypassed. Do I need to indicate Arp1 layer and Arp2 layer in PlayNote command inside Main Script? Thank you.

Unfortunately it doesn’t work like that. Flexphraser deals with midi. Because you have no zones in layers Arp1 and Arp2 there is nothing to play. There is no way to send audio to flexphraser.

You could put the Arp1 and Arp2 layers as the first sublayers inside your Main layer. But you would need to put all layers currently in the Main layer inside the Arp1 and Arp2 sublayers. Possibly duplicating them.

Flexphraser affects layers and zones in its own layer.

I got it now. I’ll test and see if I can achieve what I want. Thanks!