HELP: A "Reset" switch to setting different parameters to desired values

Post topics about HALion scripting.
Post Reply
FedericoS
New Member
Posts: 15
Joined: Fri Jan 03, 2020 5:40 pm
Contact:

HELP: A "Reset" switch to setting different parameters to desired values

Post by FedericoS »

Hello,
I am creating some short scripts to use with a switch (push) that allow to reset (or set to the desired value) various parameters.
It works fine with many controls, but doesn't works with the mod Matrix parameters, it seems that the reference (address) is wrong. I tried every combination without a result. The wrong part is probably "Mod 3.Destination.Depth". I hope anyone can help me.

Code: Select all

-- RESET ENV3

function onResetEnv3()

newEnv3A = -100
newEnv3R = -100
newEnv3L1 = 0
newEnv3L2 = 0
newIntE3 = 0

	this.parent:getZone():setParameter("UserAttOffset", newEnv3A)
	this.parent:getZone():setParameter("UserRelOffset", newEnv3R)
	this.parent:getZone():setParameter("UserL0Offset", newEnv3L1)
        this.parent:getZone():setParameter("UserLROffset", newEnv3L2)
        this.parent:getZone():setParameter("Mod 3.Destination.Depth", newIntE3)

  
end

defineParameter("ResetEnv3", onResetEnv3)

misohoza
Member
Posts: 938
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: HELP: A "Reset" switch to setting different parameters to desired values

Post by misohoza »

For modulation matrix parameters you need to use getModulationMatrixRow()

So in your case it probably should be

Code: Select all

this.parent:getZone():getModulationMatrixRow(3):setParameter("Destination.Depth", newIntE3)
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

FedericoS
New Member
Posts: 15
Joined: Fri Jan 03, 2020 5:40 pm
Contact:

Re: HELP: A "Reset" switch to setting different parameters to desired values

Post by FedericoS »

Great, thanks you so much! Everything work as I want now.
:cry: But now, I am trying now to create a single switch that clear (and delete) all the steps of a sequence of a flexphrases module....
Any idea of how I can obtain it? I think I need to create a script that connect and create a single group of all 32 integer variables?... so pushing my switch i disable its.

Thanks again!

misohoza
Member
Posts: 938
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Re: HELP: A "Reset" switch to setting different parameters to desired values

Post by misohoza »

If you mean Step Modulator then yes, you can set all steps to zero.

Code: Select all

stepModulator = this.parent:getMidiModule("Mono Step Modulator")
assert(stepModulator)

defineParameter("reset", nil, false, function() onReset() end)

function onReset()
  if reset then
    for i = 1, 32 do
      stepModulator:setParameter("step"..i, 0)
    end
    reset = false
  end
end
Step Modulator.zip
(7.74 KiB) Downloaded 34 times
But I don't think it's possible to do this with FlexPhraser.
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 10.5, Wavelab Pro 9.5, Halion 6, Dorico 3,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

FedericoS
New Member
Posts: 15
Joined: Fri Jan 03, 2020 5:40 pm
Contact:

Re: HELP: A "Reset" switch to setting different parameters to desired values

Post by FedericoS »

Thanks for your fast feedback and for your script misohoza, but yes I mean to do it on Flexphraser. I think it need an internal script inside the element FlexPhraserStepSeq (in the basic control templates).
Probably today, I went close, but I think is needed a part of script that include the interval of the step to reset (for examples 1 to 32) and use it to create a unique defineParameter. I explored the FlexPhraserStepSeq inside script and probably the interval have to includes all values of integer @VarEnable... :?:

I finished to create my amazing own interface synth, it would be the cherry on the cake ;)

Post Reply

Return to “Halion Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest