| Buzztard Bt-Core Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals | ||||
BtWirePatternBtWirePattern — class for an event pattern of a BtMachine instance |
#include <libbtcore/core.h> struct BtWirePattern; void bt_wire_pattern_blend_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param); void bt_wire_pattern_blend_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick); BtWirePattern * bt_wire_pattern_copy (const BtWirePattern * const self,const BtPattern * const pattern); void bt_wire_pattern_delete_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param); void bt_wire_pattern_delete_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick); void bt_wire_pattern_delete_full_row (const BtWirePattern * const self,const gulong tick); void bt_wire_pattern_delete_row (const BtWirePattern * const self,const gulong tick,const gulong param); gboolean bt_wire_pattern_deserialize_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param,const gchar *data); void bt_wire_pattern_flip_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param); void bt_wire_pattern_flip_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick); gchar * bt_wire_pattern_get_event (const BtWirePattern * const self,const gulong tick,const gulong param); GValue * bt_wire_pattern_get_event_data (const BtWirePattern * const self,const gulong tick,const gulong param); void bt_wire_pattern_insert_full_row (const BtWirePattern * const self,const gulong tick); void bt_wire_pattern_insert_row (const BtWirePattern * const self,const gulong tick,const gulong param); BtWirePattern * bt_wire_pattern_new (const BtSong * const song,const BtWire * const wire,const BtPattern * const pattern); void bt_wire_pattern_randomize_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param); void bt_wire_pattern_randomize_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick); void bt_wire_pattern_serialize_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param,GString *data); void bt_wire_pattern_serialize_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,GString *data); gboolean bt_wire_pattern_set_event (const BtWirePattern * const self,const gulong tick,const gulong param,const gchar * const value); gboolean bt_wire_pattern_test_event (const BtWirePattern * const self,const gulong tick,const gulong param); gboolean bt_wire_pattern_tick_has_data (const BtWirePattern * const self,const gulong tick);
"pattern" BtPattern* : Read / Write / Construct Only "song" BtSong* : Read / Write / Construct Only "wire" BtWire* : Read / Write / Construct Only
A wire-pattern contains a grid of events. Events are parameter changes in
BtWire objects. The events are stored as GValues. Cells contaning NULL
have no event for the parameter at the time.
The wire-patterns are used in normal BtPattern objects as a group for each input of the BtMachine that is the owner of the pattern.
Wire-patterns synchronize their length to the length of the pattern they belong to.
struct BtWirePattern;
Class that holds a sequence of automation events for a BtWire.
void bt_wire_pattern_blend_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param);
Fade values from start_tick to end_tick for param.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
|
the parameter |
Since 0.3
void bt_wire_pattern_blend_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick);
Fade values from start_tick to end_tick for all params.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
Since 0.3
BtWirePattern * bt_wire_pattern_copy (const BtWirePattern * const self,const BtPattern * const pattern);
Create a new instance as a copy of the given instance. This is usualy done in
sync with bt_pattern_copy().
|
the wire pattern to create a copy from |
|
the new pattern for the copy |
Returns : |
the new instance or NULL in case of an error |
void bt_wire_pattern_delete_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param);
Randomize values from start_tick to end_tick for param.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
|
the parameter |
Since 0.6
void bt_wire_pattern_delete_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick);
Clear values from start_tick to end_tick for all params.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
Since 0.6
void bt_wire_pattern_delete_full_row (const BtWirePattern * const self,const gulong tick);
Delete row for all parameters.
|
the pattern |
|
the postion to delete |
Since 0.3
void bt_wire_pattern_delete_row (const BtWirePattern * const self,const gulong tick,const gulong param);
Delete row for given param.
|
the pattern |
|
the postion to delete |
|
the parameter |
Since 0.3
gboolean bt_wire_pattern_deserialize_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param,const gchar *data);
Deserializes values to start_tick to end_tick for param from data.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
|
the parameter |
|
the source data |
Returns : |
TRUE for success, FALSE e.g. to indicate incompative GType values
for the column specified by param and the data. |
Since 0.6
void bt_wire_pattern_flip_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param);
Flips values from start_tick to end_tick for param up-side down.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
|
the parameter |
Since 0.6
void bt_wire_pattern_flip_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick);
Flips values from start_tick to end_tick for all params up-side down.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
Since 0.6
gchar * bt_wire_pattern_get_event (const BtWirePattern * const self,const gulong tick,const gulong param);
Returns the string representation of the specified cell. Free it when done.
|
the pattern the cell belongs to |
|
the tick (time) position starting with 0 |
|
the number of the parameter starting with 0 |
Returns : |
a newly allocated string with the data or NULL on error |
GValue * bt_wire_pattern_get_event_data (const BtWirePattern * const self,const gulong tick,const gulong param);
Fetches a cell from the given location in the pattern. If there is no event
there, then the GValue is uninitialized. Test with BT_IS_GVALUE(event).
|
the pattern to search for the param |
|
the tick (time) position starting with 0 |
|
the number of the parameter starting with 0 |
Returns : |
the GValue or NULL if out of the pattern range |
void bt_wire_pattern_insert_full_row (const BtWirePattern * const self,const gulong tick);
Insert one empty row for all parameters.
|
the pattern |
|
the postion to insert at |
Since 0.3
void bt_wire_pattern_insert_row (const BtWirePattern * const self,const gulong tick,const gulong param);
Insert one empty row for given param.
|
the pattern |
|
the postion to insert at |
|
the parameter |
Since 0.3
BtWirePattern * bt_wire_pattern_new (const BtSong * const song,const BtWire * const wire,const BtPattern * const pattern);
Create a new instance.
|
the song the new instance belongs to |
|
the wire the pattern belongs to |
|
the pattern that gets extended |
Returns : |
the new instance or NULL in case of an error |
void bt_wire_pattern_randomize_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param);
Randomize values from start_tick to end_tick for param.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
|
the parameter |
Since 0.3
void bt_wire_pattern_randomize_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick);
Randomize values from start_tick to end_tick for all params.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
Since 0.3
void bt_wire_pattern_serialize_column (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,const gulong param,GString *data);
Serializes values from start_tick to end_tick for param into data.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
|
the parameter |
|
the target |
Since 0.6
void bt_wire_pattern_serialize_columns (const BtWirePattern * const self,const gulong start_tick,const gulong end_tick,GString *data);
Serializes values from start_tick to end_tick for all params into data.
|
the pattern |
|
the start postion for the range |
|
the end postion for the range |
|
the target |
Since 0.6
gboolean bt_wire_pattern_set_event (const BtWirePattern * const self,const gulong tick,const gulong param,const gchar * const value);
Stores the supplied value into the specified pattern cell.
|
the pattern the cell belongs to |
|
the tick (time) position starting with 0 |
|
the number of the parameter starting with 0 |
|
the string representation of the value to store |
Returns : |
TRUE for success |
gboolean bt_wire_pattern_test_event (const BtWirePattern * const self,const gulong tick,const gulong param);
Tests if there is an event in the specified cell.
|
the pattern the cell belongs to |
|
the tick (time) position starting with 0 |
|
the number of the parameter starting with 0 |
Returns : |
TRUE if there is an event |
gboolean bt_wire_pattern_tick_has_data (const BtWirePattern * const self,const gulong tick);
Check if there are any event in the given pattern-row.
"pattern" property"pattern" BtPattern* : Read / Write / Construct Only
Pattern object, the wire-pattern belongs to.
"song" property"song" BtSong* : Read / Write / Construct Only
Song object, the pattern belongs to.
"wire" property"wire" BtWire* : Read / Write / Construct Only
Wire object, the wire-pattern belongs to.
"param-changed" signalvoid user_function (BtWirePattern *self,
gulong tick,
BtWire *wire,
gulong param,
gpointer user_data) : No Hooks
signals that a param of this wire-pattern has been changed
|
the wire-pattern object that emitted the signal |
|
the tick position inside the pattern |
|
the wire for which it changed |
|
the parameter index |
|
user data set when the signal handler was connected. |
"pattern-changed" signalvoid user_function (BtWirePattern *self,
gpointer user_data) : No Hooks
signals that this wire-pattern has been changed (more than in one place)
|
the wire-pattern object that emitted the signal |
|
user data set when the signal handler was connected. |