@whale-av The context is to create an abstraction to convert time values from a unit specified in a tempo message to ms. The abstraction needs to accept every possible variant -- that is, the question is not how to write a tempo message as a personal style feature -- the question is how to interpret correctly every possible valid symbol.
It turns out... when documentation fails, one can always search the source code.
if (!strcmp(s2, "millisecond") || !strcmp(s2, "msec")) /* msec */
*samps = 0, *unit = 1./amount;
else if (!strncmp(s2, "sec", 3)) /* seconds */
*samps = 0, *unit = 1000./amount;
else if (!strncmp(s2, "min", 3)) /* minutes */
*samps = 0, *unit = 60000./amount;
else if (!strncmp(s2, "sam", 3)) /* samples */
*samps = 1, *unit = 1./amount;
- For milliseconds, write exactly "millisecond" or "msec" (no plural), with or without "per."
- The other time units match the first three characters only and the rest are ignored. So you could write "perminimum" and it would be treated like "permin."
So... [list fromsymbol] it will have to be.
EDIT: Like this:
I cheated and allow e.g. "millisec" where MSP's code would reject it, but, close enough.