Handling large parameter lists

Hi, my new plug-in has the potential to have a really large parameter list.
How are people handling them in something like parameterChanged where I’m passed a string name? I’m currently using a load of ‘if’ statements which will become quite unwieldy at some point.

Using a map of some kind where the key is the parameter name and the value is the parameter would allow you to do something like this:

parameterMap[parameterID].doSomethingWithTheParameter();

What exactly are you trying to do in the listener callback?

1 Like

I figured I would use something like a key map. That looks great, thanks.

Surely it’d make more sense to attach different types of listener to different parameters rather than listen to all changes and then decide what to do…?

2 Likes

Yes Jules, that does sound more appropriate. I think I’m just being lazy at the mo.
Thanks.