Best way to work with many parameters

Hi all,

I’m making a drum machine, so have essentially many repeating parameters, in my case 30 x 8 voices, so 240.

This can make the parameter reading a bit clunky looking, so I will likely put that into an unordered map with the paramID and setter function.

However, with regards to parameter creation, I was wondering what standard practice is in these cases. I know that I could generate these on initalisation of the controller, using a loop and creating the IDs automatically using an offset for the voice number etc. But when you also include the string handling to add the name prefixes, this ends up feeling clunkier than just having a 240 long list of addParameter(XXX). I’ve seen other methods where the parameter info is statically defined elsewhere in a container class, and this is looped into addParameter calls on controller initialisation. This also feels wrong to me as, it’s essentially just moving the big block of calls elsewhere to an unnecessary class

I was wondering how others handle this, and whether in the end despite being a bit bloated people just opt to copy and paste and have the large blocks of addParameter calls?

It is recommended to use Unit to sort your parameters, could be in you case 1 unit per Voice… check in the VSTSDK: Parameters and Automation - VST 3 Developer Portal