parametersID : any characters restrictions?


#1

I remember a tutorial that was stating that paramsIDs should not contain spaces.
Is that correct, or is it ok to have spaces in those?
is there any other restriction?

edit: here is the quote from the tutorial :

The parameter ID should be a unique identifier for this parameter. Think of this like a variable name; it can contain alphanumeric characters and underscores, but no spaces

https://docs.juce.com/master/tutorial_audio_parameter.html


#2

If you’re using (or may want to use) XML to serialise your plug-in’s state then it makes sense to choose parameter IDs which are also valid XML identifiers.


#3

sure. I was more worried about hosts compatibility, and something that would not trigger any assertions. But if the paramIDs can be anything then it’s fine. no extra assertions are needed.


#4

TBH when you’re creating identifiers that need to be used by any host, on any OS, and which you’re going to want to store in encoded formats that you may decide to change in the future, the only really safe choice is to do what the tutorial recommends and avoid any kind of space or punctuation