Synthesizer settings. More...
Defines | |
#define | FLUID_HINT_BOUNDED_BELOW 0x1 |
Hint FLUID_HINT_BOUNDED_BELOW indicates that the LowerBound field of the FLUID_PortRangeHint should be considered meaningful. | |
#define | FLUID_HINT_BOUNDED_ABOVE 0x2 |
Hint FLUID_HINT_BOUNDED_ABOVE indicates that the UpperBound field of the FLUID_PortRangeHint should be considered meaningful. | |
#define | FLUID_HINT_TOGGLED 0x4 |
Hint FLUID_HINT_TOGGLED indicates that the data item should be considered a Boolean toggle. | |
#define | FLUID_HINT_SAMPLE_RATE 0x8 |
Hint FLUID_HINT_SAMPLE_RATE indicates that any bounds specified should be interpreted as multiples of the sample rate. | |
#define | FLUID_HINT_LOGARITHMIC 0x10 |
Hint FLUID_HINT_LOGARITHMIC indicates that it is likely that the user will find it more intuitive to view values using a logarithmic scale. | |
#define | FLUID_HINT_INTEGER 0x20 |
Hint FLUID_HINT_INTEGER indicates that a user interface would probably wish to provide a stepped control taking only integer values. | |
#define | FLUID_HINT_FILENAME 0x01 |
String setting is a file name. | |
#define | FLUID_HINT_OPTIONLIST 0x02 |
Setting is a list of string options. | |
Typedefs | |
typedef void(* | fluid_settings_foreach_option_t )(void *data, char *name, char *option) |
Callback function type used with fluid_settings_foreach_option(). | |
typedef void(* | fluid_settings_foreach_t )(void *data, char *name, int type) |
Callback function type used with fluid_settings_foreach(). | |
Enumerations | |
enum | fluid_types_enum { FLUID_NO_TYPE = -1, FLUID_NUM_TYPE, FLUID_INT_TYPE, FLUID_STR_TYPE, FLUID_SET_TYPE } |
Settings type. More... | |
Functions | |
FLUIDSYNTH_API fluid_settings_t * | new_fluid_settings (void) |
Create a new settings object. | |
FLUIDSYNTH_API void | delete_fluid_settings (fluid_settings_t *settings) |
Delete the provided settings object. | |
FLUIDSYNTH_API int | fluid_settings_get_type (fluid_settings_t *settings, const char *name) |
Get the type of the setting with the given name. | |
FLUIDSYNTH_API int | fluid_settings_get_hints (fluid_settings_t *settings, const char *name) |
Get the hints for the named setting as an integer bitmap. | |
FLUIDSYNTH_API int | fluid_settings_is_realtime (fluid_settings_t *settings, const char *name) |
Ask whether the setting is changeable in real-time. | |
FLUIDSYNTH_API int | fluid_settings_setstr (fluid_settings_t *settings, const char *name, const char *str) |
Set a string value for a named setting. | |
FLUIDSYNTH_API int | fluid_settings_copystr (fluid_settings_t *settings, const char *name, char *str, int len) |
Copy the value of a string setting. | |
FLUIDSYNTH_API int | fluid_settings_dupstr (fluid_settings_t *settings, const char *name, char **str) |
Duplicate the value of a string setting. | |
FLUIDSYNTH_API int | fluid_settings_getstr (fluid_settings_t *settings, const char *name, char **str) |
Get the value of a string setting. | |
FLUIDSYNTH_API char * | fluid_settings_getstr_default (fluid_settings_t *settings, const char *name) |
Get the default value of a string setting. | |
FLUIDSYNTH_API int | fluid_settings_str_equal (fluid_settings_t *settings, const char *name, const char *value) |
Test a string setting for some value. | |
FLUIDSYNTH_API int | fluid_settings_setnum (fluid_settings_t *settings, const char *name, double val) |
Set a numeric value for a named setting. | |
FLUIDSYNTH_API int | fluid_settings_getnum (fluid_settings_t *settings, const char *name, double *val) |
Get the numeric value of a named setting. | |
FLUIDSYNTH_API double | fluid_settings_getnum_default (fluid_settings_t *settings, const char *name) |
Get the default value of a named numeric (double) setting. | |
FLUIDSYNTH_API void | fluid_settings_getnum_range (fluid_settings_t *settings, const char *name, double *min, double *max) |
Get the range of values of a numeric setting. | |
FLUIDSYNTH_API int | fluid_settings_setint (fluid_settings_t *settings, const char *name, int val) |
Set an integer value for a setting. | |
FLUIDSYNTH_API int | fluid_settings_getint (fluid_settings_t *settings, const char *name, int *val) |
Get an integer value setting. | |
FLUIDSYNTH_API int | fluid_settings_getint_default (fluid_settings_t *settings, const char *name) |
Get the default value of an integer setting. | |
FLUIDSYNTH_API void | fluid_settings_getint_range (fluid_settings_t *settings, const char *name, int *min, int *max) |
Get the range of values of an integer setting. | |
FLUIDSYNTH_API void | fluid_settings_foreach_option (fluid_settings_t *settings, const char *name, void *data, fluid_settings_foreach_option_t func) |
Iterate the available options for a named string setting, calling the provided callback function for each existing option. | |
FLUIDSYNTH_API int | fluid_settings_option_count (fluid_settings_t *settings, const char *name) |
Count option string values for a string setting. | |
FLUIDSYNTH_API char * | fluid_settings_option_concat (fluid_settings_t *settings, const char *name, const char *separator) |
Concatenate options for a string setting together with a separator between. | |
FLUIDSYNTH_API void | fluid_settings_foreach (fluid_settings_t *settings, void *data, fluid_settings_foreach_t func) |
Iterate the existing settings defined in a settings object, calling the provided callback function for each setting. |
Synthesizer settings.
#define FLUID_HINT_BOUNDED_BELOW 0x1 |
Hint FLUID_HINT_BOUNDED_BELOW indicates that the LowerBound field of the FLUID_PortRangeHint should be considered meaningful.
The value in this field should be considered the (inclusive) lower bound of the valid range. If FLUID_HINT_SAMPLE_RATE is also specified then the value of LowerBound should be multiplied by the sample rate.
#define FLUID_HINT_BOUNDED_ABOVE 0x2 |
Hint FLUID_HINT_BOUNDED_ABOVE indicates that the UpperBound field of the FLUID_PortRangeHint should be considered meaningful.
The value in this field should be considered the (inclusive) upper bound of the valid range. If FLUID_HINT_SAMPLE_RATE is also specified then the value of UpperBound should be multiplied by the sample rate.
#define FLUID_HINT_TOGGLED 0x4 |
Hint FLUID_HINT_TOGGLED indicates that the data item should be considered a Boolean toggle.
Data less than or equal to zero should be considered `off' or `false,' and data above zero should be considered `on' or `true.' FLUID_HINT_TOGGLED may not be used in conjunction with any other hint.
#define FLUID_HINT_SAMPLE_RATE 0x8 |
Hint FLUID_HINT_SAMPLE_RATE indicates that any bounds specified should be interpreted as multiples of the sample rate.
For instance, a frequency range from 0Hz to the Nyquist frequency (half the sample rate) could be requested by this hint in conjunction with LowerBound = 0 and UpperBound = 0.5. Hosts that support bounds at all must support this hint to retain meaning.
#define FLUID_HINT_LOGARITHMIC 0x10 |
Hint FLUID_HINT_LOGARITHMIC indicates that it is likely that the user will find it more intuitive to view values using a logarithmic scale.
This is particularly useful for frequencies and gains.
#define FLUID_HINT_INTEGER 0x20 |
Hint FLUID_HINT_INTEGER indicates that a user interface would probably wish to provide a stepped control taking only integer values.
As there is an integer setting type, this hint is not used.typedef void(* fluid_settings_foreach_option_t)(void *data, char *name, char *option) |
Callback function type used with fluid_settings_foreach_option().
data | User defined data pointer
|
typedef void(* fluid_settings_foreach_t)(void *data, char *name, int type) |
Callback function type used with fluid_settings_foreach().
data | User defined data pointer
|
enum fluid_types_enum |
Settings type.
Each setting has a defined type: numeric (double), integer, string or a set of values. The type of each setting can be retrieved using the function fluid_settings_get_type()
FLUIDSYNTH_API fluid_settings_t* new_fluid_settings | ( | void | ) |
Create a new settings object.
FLUIDSYNTH_API void delete_fluid_settings | ( | fluid_settings_t * | settings | ) |
Delete the provided settings object.
settings | a settings object |
FLUIDSYNTH_API int fluid_settings_get_type | ( | fluid_settings_t * | settings, | |
const char * | name | |||
) |
Get the type of the setting with the given name.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_get_hints | ( | fluid_settings_t * | settings, | |
const char * | name | |||
) |
Get the hints for the named setting as an integer bitmap.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_is_realtime | ( | fluid_settings_t * | settings, | |
const char * | name | |||
) |
Ask whether the setting is changeable in real-time.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_setstr | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
const char * | str | |||
) |
Set a string value for a named setting.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_copystr | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
char * | str, | |||
int | len | |||
) |
Copy the value of a string setting.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_dupstr | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
char ** | str | |||
) |
Duplicate the value of a string setting.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_getstr | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
char ** | str | |||
) |
Get the value of a string setting.
settings | a settings object
|
FLUIDSYNTH_API char* fluid_settings_getstr_default | ( | fluid_settings_t * | settings, | |
const char * | name | |||
) |
Get the default value of a string setting.
Note that the returned string is not owned by the caller and should not be modified or freed.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_str_equal | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
const char * | s | |||
) |
Test a string setting for some value.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_setnum | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
double | val | |||
) |
Set a numeric value for a named setting.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_getnum | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
double * | val | |||
) |
Get the numeric value of a named setting.
settings | a settings object
|
FLUIDSYNTH_API double fluid_settings_getnum_default | ( | fluid_settings_t * | settings, | |
const char * | name | |||
) |
Get the default value of a named numeric (double) setting.
settings | a settings object
|
FLUIDSYNTH_API void fluid_settings_getnum_range | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
double * | min, | |||
double * | max | |||
) |
Get the range of values of a numeric setting.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_setint | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
int | val | |||
) |
Set an integer value for a setting.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_getint | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
int * | val | |||
) |
Get an integer value setting.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_getint_default | ( | fluid_settings_t * | settings, | |
const char * | name | |||
) |
Get the default value of an integer setting.
settings | a settings object
|
FLUIDSYNTH_API void fluid_settings_getint_range | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
int * | min, | |||
int * | max | |||
) |
Get the range of values of an integer setting.
settings | a settings object
|
FLUIDSYNTH_API void fluid_settings_foreach_option | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
void * | data, | |||
fluid_settings_foreach_option_t | func | |||
) |
Iterate the available options for a named string setting, calling the provided callback function for each existing option.
settings | a settings object
|
FLUIDSYNTH_API int fluid_settings_option_count | ( | fluid_settings_t * | settings, | |
const char * | name | |||
) |
Count option string values for a string setting.
settings | a settings object
|
FLUIDSYNTH_API char* fluid_settings_option_concat | ( | fluid_settings_t * | settings, | |
const char * | name, | |||
const char * | separator | |||
) |
Concatenate options for a string setting together with a separator between.
settings | Settings object
|
FLUIDSYNTH_API void fluid_settings_foreach | ( | fluid_settings_t * | settings, | |
void * | data, | |||
fluid_settings_foreach_t | func | |||
) |
Iterate the existing settings defined in a settings object, calling the provided callback function for each setting.
settings | a settings object
|