[gmpi] Re: lost-n-found #3 parameter stuff

I think what Mike and I wanted to say, is that there is a need for:
- standard plugin parameter meta-data that the host can then use all by
itself
- or (only in case that is not enough) some way to let the host ask the
plugin to do the necessary conversions (in 2 directions) or stepping or
clipping


Provisions for both already exist in VST:

There's the VSTParameterProperties struct, which contains meta data like
"step", "small step", large step", flags that specify whether the parameter
uses integer steps, float steps, display index (for the display order),
category (for grouping parameters), ... However, plugins are currently not
required to support getParameterProperties, so the host can't usually do the
right thing in a generic UI.

And there's the following function:

  virtual bool string2parameter (long index, char *text);

  Convert a string representation to a parameter value. Especially useful
  for plug-ins without user interface. The application can then implement
  a text edit field for the user to set a parameter by entering text.
  index  The index to the parameter.
  text   A textual description of the parameter's value. A null pointer
         is used to check the capability (return true).
  return true : Success.
         false : Failure.

and of course also:

  virtual void getParameterDisplay (long index, char *text);

which converts a parameter to a string.



As for Audio Units, I'm not really acquainted with the SDK, but I found this
related to parameter info:

Parameter units:
kAudioUnitParameterUnit_Generic = 0
kAudioUnitParameterUnit_Indexed = 1
kAudioUnitParameterUnit_Boolean = 2
kAudioUnitParameterUnit_Percent = 3
kAudioUnitParameterUnit_Seconds = 4
kAudioUnitParameterUnit_SampleFrame
...etc...
(there are 26 defined in total, a.o. also dB, Hertz and cents ;-) )

Parameter flags:
kAudioUnitParameterFlag_CFNameRelease = (1L << 4)
kAudioUnitParameterFlag_HasClump = (1L << 20)
kAudioUnitParameterFlag_HasName = (1L << 21)
kAudioUnitParameterFlag_DisplayLogarithmic = (1L << 22)
kAudioUnitParameterFlag_IsHighResolution = (1L << 23)
kAudioUnitParameterFlag_NonRealTime = (1L << 24)
kAudioUnitParameterFlag_CanRamp = (1L << 25)
kAudioUnitParameterFlag_ExpertMode = (1L << 26)
kAudioUnitParameterFlag_HasCFNameString = (1L << 27)
kAudioUnitParameterFlag_IsGlobalMeta = (1L << 28)
kAudioUnitParameterFlag_IsElementMeta = (1L << 29)
kAudioUnitParameterFlag_IsReadable = (1L << 30)
kAudioUnitParameterFlag_IsWritable

Didn't find string-->param or param-->string functions though for the cases
where
not one of these 26 standard units is used.
In most cases (if one of the 26 units IS used) I guess the host builds a UI
based on the found meta data.

Here, I rest my case ;-)

Koen


----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: