AgsPattern

AgsPattern — Pattern representing tones

Functions

Properties

gboolean current-bit Read
guint first-index Read / Write
guint offset Read / Write
AgsPort * port Read / Write
guint second-index Read / Write
AgsTimestamp * timestamp Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── AgsPattern

Implemented Interfaces

AgsPattern implements AgsConnectable, AgsTactable and AgsPortlet.

Includes

#include <ags/audio/ags_pattern.h>

Description

AgsPattern represents an audio pattern of tones.

Functions

ags_pattern_find_near_timestamp ()

GList *
ags_pattern_find_near_timestamp (GList *pattern,
                                 GObject *timestamp);

Retrieve appropriate pattern for timestamp.

Parameters

pattern

a GList containing AgsPattern

 

timestamp

the matching timestamp

 

Returns

Next match.

Since: 0.7.12


ags_pattern_set_dim ()

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

Reallocates the pattern's dimensions.

Parameters

pattern

an AgsPattern

 

dim0

bank 0 size

 

dim1

bank 1 size

 

length

amount of beats

 

Since: 0.3


ags_pattern_is_empty ()

gboolean
ags_pattern_is_empty (AgsPattern *pattern,
                      guint i,
                      guint j);


ags_pattern_get_bit ()

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

Check for tic to be played.

Parameters

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_toggle_bit ()

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

Toggle tone.

Parameters

pattern

an AgsPattern

 

i

bank index 0

 

j

bank index 1

 

bit

the tic to toggle

 

Since: 0.3


ags_pattern_new ()

AgsPattern *
ags_pattern_new ();

Creates an AgsPattern

Returns

a new AgsPattern

Since: 0.3

Types and Values

AGS_PATTERN_DEFAULT_BPM

#define AGS_PATTERN_DEFAULT_BPM (120.0)


AGS_PATTERN_TICS_PER_BEAT

#define AGS_PATTERN_TICS_PER_BEAT (1.0)


AGS_PATTERN_MINIMUM_NOTE_LENGTH

#define AGS_PATTERN_MINIMUM_NOTE_LENGTH (1.0 / 16.0)


AGS_PATTERN_MAXIMUM_NOTE_LENGTH

#define AGS_PATTERN_MAXIMUM_NOTE_LENGTH (16.0)


AGS_PATTERN_DEFAULT_LENGTH

#define AGS_PATTERN_DEFAULT_LENGTH (65535.0 / AGS_PATTERN_TICS_PER_BEAT - AGS_PATTERN_MAXIMUM_NOTE_LENGTH)


AGS_PATTERN_DEFAULT_JIFFIE

#define AGS_PATTERN_DEFAULT_JIFFIE (60.0 / AGS_PATTERN_DEFAULT_BPM / AGS_PATTERN_TICS_PER_BEAT)


AGS_PATTERN_DEFAULT_DURATION

#define AGS_PATTERN_DEFAULT_DURATION (AGS_PATTERN_DEFAULT_LENGTH * AGS_PATTERN_DEFAULT_JIFFIE * AGS_MICROSECONDS_PER_SECOND)

Property Details

The “current-bit” property

  “current-bit”              gboolean

The current bit for offset.

Flags: Read

Default value: FALSE

Since: 0.4.0


The “first-index” property

  “first-index”              guint

The first index to select pattern.

Flags: Read / Write

Allowed values: <= 256

Default value: 0

Since: 0.4.0


The “offset” property

  “offset”                   guint

The offset within the pattern.

Flags: Read / Write

Allowed values: <= 65535

Default value: 0

Since: 0.4.0


The “port” property

  “port”                     AgsPort *

The port of pattern.

Flags: Read / Write

Since: 0.4.0


The “second-index” property

  “second-index”             guint

The second index to select pattern.

Flags: Read / Write

Allowed values: <= 256

Default value: 0

Since: 0.4.0


The “timestamp” property

  “timestamp”                AgsTimestamp *

The timestamp of pattern.

Flags: Read / Write

Since: 0.7.12