Top | ![]() |
![]() |
![]() |
![]() |
GstElement * | adder-convert | Read |
gpointer | construction-error | Read / Write / Construct Only |
gulong | global-params | Read |
gchar * | id | Read / Write / Construct |
GstElement * | input-gain | Read |
GstElement * | input-post-level | Read |
GstElement * | input-pre-level | Read |
GstElement * | machine | Read |
GstElement * | output-gain | Read |
GstElement * | output-post-level | Read |
GstElement * | output-pre-level | Read |
gpointer | patterns | Read |
gchar * | plugin-name | Read / Write / Construct |
gulong | prefs-params | Read |
gchar * | pretty-name | Read |
gpointer | properties | Read |
BtSong * | song | Read / Write / Construct Only |
BtMachineState | state | Read / Write |
gulong | voice-params | Read |
gulong | voices | Read / Write / Construct |
GEnum ╰── BtMachineState GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBin ╰── BtMachine ├── BtProcessorMachine ├── BtSinkMachine ╰── BtSourceMachine
Machines are pieces in a BtSong that generate, process or play media.
The machine class takes care of inserting additional low-level elemnts to do signal conversion etc.. Further it provides general facillities like input/output level monitoring. The resulting machine instance is a box containing several processing elements.
A machine can have several GstElements:
adder: |
mixes all incoming signals |
input volume: |
gain for incoming signals |
input pre/post-gain level: |
level meter for incoming signal |
machine: |
the real machine |
output volume: |
gain for outgoing signal |
output pre/post-gain level: |
level meter for outgoing signal |
spreader: |
distibutes signal to outgoing connections |
The adder and spreader elements are activated depending on element type. The volume controls and level meters are activated as requested via the API. It is recommended to only activate them, when needed. The instances are cached after deactivation (so that they can be easily reactivated) and destroyed with the BtMachine object.
Furthermore the machine handles a list of BtCmdPattern instances. These contain event patterns that form a BtSequence.
gboolean
bt_machine_activate_adder (BtMachine * const self
);
Machines use an adder to allow multiple incoming wires. This method is used by the BtWire class to activate the adder when needed.
gboolean
bt_machine_activate_spreader (BtMachine * const self
);
Machines use a spreader to allow multiple outgoing wires. This method is used by the BtWire class to activate the spreader when needed.
void bt_machine_add_pattern (const BtMachine *self
,const BtCmdPattern *pattern
);
Add the supplied pattern to the machine. This is automatically done by
bt_pattern_new()
.
void bt_machine_bind_parameter_control (const BtMachine * const self
,GstObject *object
,const gchar *property_name
,BtIcControl *control
,BtParameterGroup *pg
);
Connect the interaction control object to the give parameter. Changes of the control-value are mapped into a change of the parameter.
void bt_machine_bind_poly_parameter_control (const BtMachine * const self
,const gchar *property_name
,BtIcControl *control
,BtParameterGroup *pg
);
Connect the interaction control object to the give parameter. Changes of the control-value are mapped into a change of the parameter.
gboolean
bt_machine_enable_input_gain (BtMachine * const self
);
Creates the input-gain element of the machine and activates it.
gboolean
bt_machine_enable_input_post_level (BtMachine * const self
);
Creates the post-gain input-level analyser of the machine and activates it.
gboolean
bt_machine_enable_input_pre_level (BtMachine * const self
);
Creates the pre-gain input-level analyser of the machine and activates it.
gboolean
bt_machine_enable_output_gain (BtMachine * const self
);
Creates the output-gain element of the machine and activates it.
gboolean
bt_machine_enable_output_post_level (BtMachine * const self
);
Creates the post-gain output-level analyser of the machine and activates it.
gboolean
bt_machine_enable_output_pre_level (BtMachine * const self
);
Creates the pre-gain output-level analyser of the machine and activates it.
BtParameterGroup *
bt_machine_get_global_param_group (const BtMachine * const self
);
Get the parameter group of global parameters.
BtCmdPattern * bt_machine_get_pattern_by_index (const BtMachine * const self
,const gulong index
);
Fetches the pattern from the given position of the machines pattern list.
The pattern must have been added previously to this setup with
bt_machine_add_pattern()
.
self |
the machine to search for the pattern |
|
index |
the index of the pattern in the machines pattern list |
BtCmdPattern instance or NULL
if not found. Unref
the pattern, when done with it.
[transfer full]
BtCmdPattern * bt_machine_get_pattern_by_name (const BtMachine * const self
,const gchar * const name
);
Search the machine for a pattern by the supplied name.
The pattern must have been added previously to this setup with
bt_machine_add_pattern()
.
BtCmdPattern instance or NULL
if not found. Unref
the pattern, when done with it.
[transfer full]
BtParameterGroup *
bt_machine_get_prefs_param_group (const BtMachine * const self
);
Get the parameter group of machine properties. Properties are settings that cannot be changed during playback.
gchar *
bt_machine_get_unique_pattern_name (const BtMachine * const self
);
The function generates a unique pattern name for this machine by eventually adding a number postfix. This method should be used when adding new patterns.
BtParameterGroup * bt_machine_get_voice_param_group (const BtMachine * const self
,const gulong voice
);
Get the parameter group of voice parameters for the given voice
.
BtWire * bt_machine_get_wire_by_dst_machine (const BtMachine * const self
,const BtMachine * const dst
);
Searches for a wire in the wires originating from this machine that uses the given BtMachine instances as a target.
self |
the machine that is at src of a wire |
|
dst |
the machine that is at the dst end of the wire |
Since: 0.6
gboolean
bt_machine_handles_waves (const BtMachine * const self
);
Tells if the machine is using the wave-table.
Since: 0.7
gboolean
bt_machine_has_active_adder (const BtMachine * const self
);
Checks if the machine currently uses an adder. This method is used by the BtWire class to activate the adder when needed.
gboolean
bt_machine_has_active_spreader (const BtMachine * const self
);
Checks if the machine currently uses an spreader. This method is used by the BtWire class to activate the spreader when needed.
gboolean
bt_machine_has_patterns (const BtMachine * const self
);
Check if the machine has BtPattern entries appart from the standart private ones.
gboolean
bt_machine_is_polyphonic (const BtMachine * const self
);
Tells if the machine can produce (multiple) voices. Monophonic machines have their (one) voice params as part of the global params.
void
bt_machine_randomize_parameters (const BtMachine * const self
);
Randomizes machine parameters.
void bt_machine_remove_pattern (const BtMachine *self
,const BtCmdPattern *pattern
);
Remove the given pattern from the machine.
void
bt_machine_reset_parameters (const BtMachine * const self
);
Resets machine parameters back to defaults.
void
bt_machine_set_param_defaults (const BtMachine *const self
);
Sets default values that should be used before the first control-point. Should be called, if all parameters are changed (like after switching presets).
void bt_machine_unbind_parameter_control (const BtMachine * const self
,GstObject *object
,const gchar *property_name
);
Disconnect the interaction control object from the give parameter.
void
bt_machine_unbind_parameter_controls (const BtMachine * const self
);
Disconnect all interaction controls.
struct BtMachine { /*< read-only >*/ GList *src_wires; GList *dst_wires; };
Base object for a virtual piece of hardware (generator, effect, ...).
struct BtMachineClass { /* virtual methods for subclasses */ gboolean (*check_type)(const BtMachine * const machine, const gulong pad_src_ct, const gulong pad_sink_ct); };
Base class for machines.
A machine is always in one of the 4 states. Use the "state" property of the BtMachine to change or query the current state.
“adder-convert”
property“adder-convert” GstElement *
the after mixing format converter element, if any.
Flags: Read
“construction-error”
property“construction-error” gpointer
signal failed instance creation.
Flags: Read / Write / Construct Only
“global-params”
property“global-params” gulong
number of dynamic params for the machine.
Flags: Read
“id”
property“id” gchar *
machine identifier.
Flags: Read / Write / Construct
Default value: "unamed machine"
“input-post-level”
property“input-post-level” GstElement *
the post-gain input-level element, if any.
Flags: Read
“input-pre-level”
property“input-pre-level” GstElement *
the pre-gain input-level element, if any.
Flags: Read
“output-post-level”
property“output-post-level” GstElement *
the post-gain output-level element, if any.
Flags: Read
“output-pre-level”
property“output-pre-level” GstElement *
the pre-gain output-level element, if any.
Flags: Read
“plugin-name”
property“plugin-name” gchar *
the name of the gst plugin for the machine.
Flags: Read / Write / Construct
Default value: "unamed plugin"
“prefs-params”
property“prefs-params” gulong
number of static params for the machine.
Flags: Read
“pretty-name”
property“pretty-name” gchar *
pretty-printed name for display purposes.
Flags: Read
Default value: NULL
“song”
property“song” BtSong *
song object, the machine belongs to.
Flags: Read / Write / Construct Only
“state”
property“state” BtMachineState
the current state of this machine.
Flags: Read / Write
Default value: BT_MACHINE_STATE_NORMAL
“voice-params”
property“voice-params” gulong
number of dynamic params for each machine voice.
Flags: Read
“voices”
property“voices” gulong
number of voices in the machine.
Flags: Read / Write / Construct
“pattern-added”
signalvoid user_function (BtMachine *self, BtPattern *pattern, gpointer user_data)
A new pattern item has been added to the machine
self |
the machine object that emitted the signal |
|
pattern |
the new pattern |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks
“pattern-removed”
signalvoid user_function (BtMachine *self, BtPattern *pattern, gpointer user_data)
A pattern item has been removed from the machine
self |
the machine object that emitted the signal |
|
pattern |
the old pattern |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Hooks