I am trying to map AudioParameterInt values to string names to populate a dropdown menu. The int value is an index, which I want mapped to the name of the particular option as a string. From reading the AudioParameterInt documentation, I imagine this is the purpose of this optional input:
“stringFromInt An optional lambda function that converts a int value to a string with a maximum length. This may be used by hosts to display the parameter’s value.”
I am having trouble getting the syntax correct. For the following mapping, what would the code be? This is what I have right now:
addParameter(modelParam = new AudioParameterInt(MODEL_ID, MODEL_NAME, 0, 2, 0));
And I would want to map something like this:
0:Low
1:Med
2:High
Thanks!