This was being caused by certain functions not being considered to return a constant. Reworked the set functions_with_constant_return to be generated when creating builtins. It adds any function from the set functions which can return a 'real' or 'integer'. I believe this is how Kontakt is able to determine if the expression is valid within get/set_event_par or get/set_engine_par.
As a side effect, optimize_code would no longer evaluate expressions (abs, in_range, sh_left, sh_right, by_marks, int_to_real, real, real_to_int, int), so added a new builtins set, functions_evaluated_with_optimize_code that bypasses these builtins to allow for evaluation.
Close #350
This was being caused by certain functions not being considered to return a constant. Reworked the set
functions_with_constant_return
to be generated when creating builtins. It adds any function from the setfunctions
which can return a 'real' or 'integer'. I believe this is how Kontakt is able to determine if the expression is valid withinget/set_event_par
orget/set_engine_par
.As a side effect,
optimize_code
would no longer evaluate expressions (abs, in_range, sh_left, sh_right, by_marks, int_to_real, real, real_to_int, int), so added a new builtins set,functions_evaluated_with_optimize_code
that bypasses these builtins to allow for evaluation.