New AudioProcessorParameter class discussion and requests

Hello Jules and the ROLI team !

I have just used for the first time in a project the class AudioProcessorParameter. Obviously, like other people, I had developed my own equivalent of it, and for a new project I tried to do everything with it. I think it is a very good idea that such a class exists so everybody will use at some point the same very well working code. Right now, I have a few remarks about it...

But first, I'd like to know if you have already some plans to add new features in this class. Do you have plans that you would like to share with us ?

The thing is there are in my opinion a few missing features that would make the class a killer. Here are my suggestions, tell me what you think :

  • In my own class, I have very convenient functions to handle the mapping between the float parameter value (from 0 to 1) and the practical values my dsp class will use, for example -20 to +20 dB for a volume parameter with a linear mapping, or 20 to 20000 Hz for a cutoff frequency parameter with a logarithmic mapping. The parameter is instancied with the necessary information (name, unit, kind of mapping, minimum mapped value, maximum mapped value, default mapped value, number of steps is applicable, and an array of strings containing the discrete values available is applicable). Then I can use some functions getMappedValue and setMappedValue to do the transformations. I have even added "presets" available at instanciation like for the cutoff frequency to handle all this stuff automatically when possible. So, would it be possible to have these kind of features in the future ? I might give you my code if you are interested... For example, the API might provide a few AudioProcessorParameter classes that we can use...
  • It would be great also to implement a few functions to simplify the access to all these parameters from the ProcessEditor class. In the JuceDemo plug-in, everything is done with public objects in the AudioProcessor
  • Another interesting thing would be to have a function returning a boolean telling if one of these parameters has been changed recently to handle the update of the DSP internal parameters

I will tell you if I have other ideas / remarks, and I think a lot of people here might share their thoughts ;)