Scripting - Strange behaviour of boolean parameters

Use this forum for an overview of collected bugs and to report new ones.
Post Reply
misohoza
Member
Posts: 859
Joined: Sun Oct 05, 2014 12:18 am
Contact:

Scripting - Strange behaviour of boolean parameters

Post by misohoza » Sun Dec 30, 2018 11:30 pm

Recently I've noticed some strange behaviour of boolean parameters.

I'm using Halion 6.2.10 version.

Parameter definition of boolean parameters returns true/false for default, but numbers 0 or 1 for min and max values. This can cause errors when calling getDisplayString and using the min/max values from parameter definition.

GetParameter function returns boolean, which is expected.

SetParameter: "true" sets a boolean parameter to "On", but you can use anything except "true" (false, nil, any string or number) to set a boolean parameter to "Off".

It should be fairly easy to reproduce:

Code: Select all

parameter = "LayerSolo"
definition = this.parent:getParameterDefinition(parameter)

print(string.format("Name:    \t%s", definition.name))
print(string.format("Type:    \t\t%s", definition.type))
print(string.format("Default: \t\t%s", definition.default))
print(string.format("Min:     \t\t%s", definition.min))
print(string.format("Max:     \t\t%s", definition.max))
print(string.format("Value:   \t\t%s\n", this.parent:getParameter(parameter)))

print(string.format("getParameter returns:\t\t %s\n", type(this.parent:getParameter(parameter))))

print("Set Parameter with boolean (true)")
this.parent:setParameter(parameter, true)
print(string.format("Value:  \t\t%s\n", this.parent:getParameter(parameter)))

messageBox("Solo button On?")

--anything except "true" sets a boolean parameter to "Off"
print("Set Parameter with string instead of boolean")
this.parent:setParameter(parameter,"blabla")
print(string.format("Value:  \t\t%s\n", this.parent:getParameter(parameter)))

--print(definition:getDisplayString(definition.min)) --error
Sure, there are ways how to work around this, but still I think this is not correct behaviour.

Can anyone confirm?
Win 10 Home, 64 bit, 8 gb ram,
Cubase Pro 9, Wavelab Pro 9, Halion 6, Dorico,
NI Komplete 10 Ultimate, Ozone 7,
UR 44

Gerrit Junge
Steinberg Employee
Posts: 161
Joined: Tue Feb 01, 2011 1:30 pm
Contact:

Re: Scripting - Strange behaviour of boolean parameters

Post by Gerrit Junge » Mon Jan 21, 2019 2:58 pm

Hi misohoza,
confirmed, I'm able to reproduce it here. Its now in our Defect-Tracking-System and listed as Bug-ID "HALLY-7731". I hope we can provide a fix for it soon.

Thanks for your report and please accept my apologies for any inconvenience caused.
Gerrit Junge
Senior Quality Engineer
VST Instruments
Steinberg Media Technologies GmbH

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 3 guests