AgsPattern

AgsPattern — Pattern representing tones

Synopsis

#include <ags/audio/ags_pattern.h>

struct              AgsPattern;
struct              AgsPatternClass;
gboolean            ags_pattern_get_bit                 (AgsPattern *pattern,
                                                         guint i,
                                                         guint j,
                                                         guint bit);
AgsPattern *        ags_pattern_get_by_timestamp        (GList *list,
                                                         GObject *timestamp);
AgsPattern *        ags_pattern_new                     ();
void                ags_pattern_set_dim                 (AgsPattern *pattern,
                                                         guint dim0,
                                                         guint dim1,
                                                         guint lenght);
void                ags_pattern_toggle_bit              (AgsPattern *pattern,
                                                         guint i,
                                                         guint j,
                                                         guint bit);

Description

AgsPattern represents an audio pattern of tones.

Details

struct AgsPattern

struct AgsPattern {
  GObject object;

  GObject *timestamp;

  guint dim[3];
  guint ***pattern;

  GObject *port;

  guint i;
  guint j;
  guint bit;
};

struct AgsPatternClass

struct AgsPatternClass {
  GObjectClass object;
};

ags_pattern_get_bit ()

gboolean            ags_pattern_get_bit                 (AgsPattern *pattern,
                                                         guint i,
                                                         guint j,
                                                         guint bit);

Check for tic to be played.

pattern :

an AgsPattern

i :

bank index 0

j :

bank index 1

bit :

the tic to check

Returns :

TRUE if tone is enabled.

Since 0.3


ags_pattern_get_by_timestamp ()

AgsPattern *        ags_pattern_get_by_timestamp        (GList *list,
                                                         GObject *timestamp);

Retrieve appropriate pattern for timestamp.

pattern :

a GList containing AgsPattern

timestamp :

the matching timestamp

Returns :

the matching pattern.

Since 0.4


ags_pattern_new ()

AgsPattern *        ags_pattern_new                     ();

Creates an AgsPattern

Returns :

a new AgsPattern

Since 0.3


ags_pattern_set_dim ()

void                ags_pattern_set_dim                 (AgsPattern *pattern,
                                                         guint dim0,
                                                         guint dim1,
                                                         guint lenght);

Reallocates the pattern's dimensions.

pattern :

an AgsPattern

dim0 :

bank 0 size

dim1 :

bank 1 size

length :

amount of beats

Since 0.3


ags_pattern_toggle_bit ()

void                ags_pattern_toggle_bit              (AgsPattern *pattern,
                                                         guint i,
                                                         guint j,
                                                         guint bit);

Toggle tone.

pattern :

an AgsPattern

i :

bank index 0

j :

bank index 1

bit :

the tic to toggle

Since 0.3