BtParameterGroup

BtParameterGroup — a group of parameter

Functions

Properties

BtMachine * machine Read / Write / Construct Only
gulong num-params Read / Write / Construct Only
gpointer params Read / Write / Construct Only
gpointer parents Read / Write / Construct Only
BtSong * song Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── BtParameterGroup

Includes

#include <libbtcore/core.h>

Description

A group of parameters, such as used in machines or wires. Once created the group will not change.

Functions

bt_parameter_group_describe_param_value ()

gchar *
bt_parameter_group_describe_param_value
                               (const BtParameterGroup * const self,
                                const gulong index,
                                GValue * const event);

Described a param value in human readable form. The type of the given value must match the type of the paramspec of the param referenced by index .

Parameters

self

the parameter group to get a param description from

 

index

the offset in the list of params

 

event

the value to describe

 

Returns

the description as newly allocated string


bt_parameter_group_get_param_details ()

void
bt_parameter_group_get_param_details (const BtParameterGroup * const self,
                                      const gulong index,
                                      GParamSpec **pspec,
                                      GValue **min_val,
                                      GValue **max_val);

Retrieves the details of a param. Any detail can be NULL if its not wanted.

Parameters

self

the parameter group to search for the param details

 

index

the offset in the list of params

 

pspec

place for the param spec.

[out]

min_val

place to hold new GValue with minimum.

[out]

max_val

place to hold new GValue with maximum.

[out]

bt_parameter_group_get_param_index ()

glong
bt_parameter_group_get_param_index (const BtParameterGroup * const self,
                                    const gchar * const name);

Searches the list of registered param of a machine for a param of the given name and returns the index if found.

Parameters

self

the parameter group to search for the param

 

name

the name of the param

 

Returns

the index if found or returns -1.


bt_parameter_group_get_param_name ()

const gchar *
bt_parameter_group_get_param_name (const BtParameterGroup * const self,
                                   const gulong index);

Gets the param name. Do not modify returned content.

Parameters

self

the parameter group to get the param name from

 

index

the offset in the list of params

 

Returns

the requested name


bt_parameter_group_get_param_no_value ()

GValue *
bt_parameter_group_get_param_no_value (const BtParameterGroup * const self,
                                       const gulong index);

Get the neutral value for the machines parameter.

Parameters

self

the parameter group to get params from

 

index

the offset in the list of params

 

Returns

the value. Don't modify.

Since: 0.6


bt_parameter_group_get_param_parent ()

GObject *
bt_parameter_group_get_param_parent (const BtParameterGroup * const self,
                                     const gulong index);

Retrieves the owner instance for the param

Parameters

self

the parameter group to search for the param

 

index

the offset in the list of params

 

Returns

the GParamSpec for the requested param.

[transfer none]


bt_parameter_group_get_param_spec ()

GParamSpec *
bt_parameter_group_get_param_spec (const BtParameterGroup * const self,
                                   const gulong index);

Retrieves the parameter specification for the param

Parameters

self

the parameter group to search for the param

 

index

the offset in the list of params

 

Returns

the GParamSpec for the requested param.

[transfer none]


bt_parameter_group_get_param_type ()

GType
bt_parameter_group_get_param_type (const BtParameterGroup * const self,
                                   const gulong index);

Retrieves the GType of a param

Parameters

self

the parameter group to search for the param type

 

index

the offset in the list of params

 

Returns

the requested GType


bt_parameter_group_get_trigger_param_index ()

glong
bt_parameter_group_get_trigger_param_index
                               (const BtParameterGroup * const self);

Searches for the first trigger parameter (if any).

Parameters

self

the parameter group to lookup the param from

 

Returns

the index of the first trigger parameter or -1 if none.


bt_parameter_group_get_wave_param_index ()

glong
bt_parameter_group_get_wave_param_index
                               (const BtParameterGroup * const self);

Searches for the wave-table index parameter (if any). This parameter should refer to a wavetable index that should be used to play a note.

Parameters

self

the parameter group to lookup the param from

 

Returns

the index of the wave-table parameter or -1 if none.


bt_parameter_group_is_param_no_value ()

gboolean
bt_parameter_group_is_param_no_value (const BtParameterGroup * const self,
                                      const gulong index,
                                      GValue * const value);

Tests if the given value is the no-value of the param

Parameters

self

the parameter group to check params from

 

index

the offset in the list of params

 

value

the value to compare against the no-value

 

Returns

TRUE if it is the no-value


bt_parameter_group_is_param_trigger ()

gboolean
bt_parameter_group_is_param_trigger (const BtParameterGroup * const self,
                                     const gulong index);

Tests if the param is a trigger param (like a key-note or a drum trigger).

Parameters

self

the parameter group to check params from

 

index

the offset in the list of params

 

Returns

TRUE if it is a trigger


bt_parameter_group_new ()

BtParameterGroup *
bt_parameter_group_new (gulong num_params,
                        GObject **parents,
                        GParamSpec **params,
                        BtSong *song,
                        const BtMachine *machine);

Create a parameter group.

Parameters

num_params

the number of parameters

 

parents

array of parent GObjects for each parameter

 

params

array of GParamSpecs for each parameter

 

song

the song

 

machine

the machine that is owns the parameter-group, use the target machine for wires.

 

Returns

the new parameter group.

[transfer full]


bt_parameter_group_randomize_values ()

void
bt_parameter_group_randomize_values (const BtParameterGroup * const self);

Randomize all parameter values.

Parameters

self

the parameter group

 

bt_parameter_group_reset_values ()

void
bt_parameter_group_reset_values (const BtParameterGroup * const self);

Reset all parameter values to their defaults.

Parameters

self

the parameter group

 

bt_parameter_group_set_param_default ()

void
bt_parameter_group_set_param_default (const BtParameterGroup * const self,
                                      const gulong index);

Set a default value that should be used before the first control-point.

Parameters

self

the parameter group

 

index

the offset in the list of params

 

bt_parameter_group_set_param_defaults ()

void
bt_parameter_group_set_param_defaults (const BtParameterGroup * const self);

Set a default value that should be used before the first control-point for each parameter.

Parameters

self

the parameter group

 

bt_parameter_group_set_param_value ()

void
bt_parameter_group_set_param_value (const BtParameterGroup * const self,
                                    const gulong index,
                                    GValue * const event);

Sets a the specified param to the give data value.

Parameters

self

the parameter group to set the param value

 

index

the offset in the list of params

 

event

the new value

 

Types and Values

struct BtParameterGroup

struct BtParameterGroup;

A group of parameters, such as used in machines or wires.

Property Details

The “machine” property

  “machine”                  BtMachine *

the respective machine object.

Flags: Read / Write / Construct Only


The “num-params” property

  “num-params”               gulong

number of params.

Flags: Read / Write / Construct Only


The “params” property

  “params”                   gpointer

pointer to GParamSpec array, takes ownership.

Flags: Read / Write / Construct Only


The “parents” property

  “parents”                  gpointer

pointer to array containing the Objects that own the paramers, takes ownership.

Flags: Read / Write / Construct Only


The “song” property

  “song”                     BtSong *

song object the param group belongs to.

Flags: Read / Write / Construct Only