![]() |
![]() |
![]() |
Buzztard Bt-Core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
BtWirePatternBtWirePattern — class for an event pattern of a BtMachine instance |
#include <libbtcore/core.h> struct BtWirePattern; BtWirePattern * bt_wire_pattern_new (const BtSong * const song
,const BtWire * const wire
,const BtPattern * const pattern
); GValue * bt_wire_pattern_get_event_data (const BtWirePattern * const self
,const gulong tick
,const gulong param
); gboolean bt_wire_pattern_set_event (const BtWirePattern * const self
,const gulong tick
,const gulong param
,const gchar * const value
); gchar * bt_wire_pattern_get_event (const BtWirePattern * const self
,const gulong tick
,const gulong param
); 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
); void bt_wire_pattern_insert_row (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_delete_row (const BtWirePattern * const self
,const gulong tick
,const gulong param
); void bt_wire_pattern_delete_full_row (const BtWirePattern * const self
,const gulong tick
); 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
); 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
);
A pattern contains a grid of events. Events are parameter changes in BtMachine objects. The events are stored aas GValues.
The patterns are used in the BtSequence to form the score of a song.
struct BtWirePattern;
Class that holds a sequence of automation events for a BtWire.
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 |
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 G_IS_VALUE(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 |
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 |
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 |
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.
|
the pattern to check |
|
the tick index in the pattern |
Returns : |
TRUE is there are events, FALSE otherwise |
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
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_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
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_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
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