(Tested in FMOD 2.01.08)
When I try to get the maximum value from a discrete parameter, I’m getting it’s value incremented by 1.
When it’s continuous, this problem doesn’t happen though.
The following snippet demonstrates my issue, where the parameter’s type & range are in its name for convenience:
studio.project.model.Event.findInstances().forEach(function(e){
e.getParameterPresets().forEach(function(p){
console.log('name - ' + p.presetOwner.name);
console.log('min - ' + p.minimum);
console.log('max - ' + p.maximum);
console.log('type - ' + p.parameterType);
console.log('=================================================================');
});
})
Returns:
name - p_continuous_0-1
min - 0
max - 1
type - 0
=================================================================
name - p_continuous_1-2
min - 1
max - 2
type - 0
=================================================================
name - p_discrete_0-1
min - 0
max - 2
type - 1
=================================================================
name - p_discrete_1-2
min - 1
max - 3
type - 1
=================================================================
Is this a bug?