2. Seq16 Data

2.1. Seq16 Data Contents

2.1.1. Seq16 Monome State Data

<<page_seq16_contents>>=
monolith_page_mstate *mstate;
<<seq16_init>>=
monolith_page_mstate_new(pg, &seq16->mstate);
<<seq16_cleanup>>=
monolith_page_mstate_free(&seq16->mstate);

2.1.2. Sequence Data

<<page_seq16_contents>>=
uint8_t seq[16];
<<seq16_init>>=
{
    int i;
    for (i = 0; i < 16; i++) {
        seq16->seq[i] = 0;
    }
}

2.1.3. Position

<<page_seq16_contents>>=
int pos;

Initialized to be -1.

<<seq16_init>>=
seq16->pos = -1;

2.1.4. Last Position

Stores the position from the last block. This is needed in order for the sample-accurate sequence to work.

<<page_seq16_contents>>=
int lastpos;

Initialized to be -1.

<<seq16_init>>=
seq16->lastpos = -1;

2.1.5. Step Size

No more than 16.

<<page_seq16_contents>>=
int size;
<<seq16_init>>=
seq16->size = 16;

2.1.6. Reset

A flag, when set, that resets at the next trigger.

<<page_seq16_contents>>=
int reset;
<<seq16_init>>=
seq16->reset = 0;

2.1.7. Display Playhead Flag

Will display the playhead position. Disabled by default.

<<page_seq16_contents>>=
int playhead;
<<seq16_init>>=
seq16->playhead = 0;

2.1.8. Event stack

Array that keeps track of event stacks. Maximum of 4 per render block. Assuming the default block size of 64 is used, this means guaranteed sample accuracy for ticks that are as small as 16 samples apart.

2.1.8.1. Struct Declaration

<<page_seq16_contents>>=
int evt[4];
int nevt;
<<seq16_init>>=
{
    seq16->nevt = 0;
}

2.2. Seq16 Typedef Declaration

All seq16 page data is contained in a struct called page_seq16_d.

<<seq16_typedefs>>=
typedef struct page_seq16_d page_seq16_d;
<<seq16_struct>>=
struct page_seq16_d {
<<page_seq16_contents>>
};

2.3. Seq16 Data Allocation/Initialization

Seq16 data is initiatlized with the function page_seq16_init.

<<seq16_function_declarations>>=
static void page_seq16_init(monolith_page *pg, page_seq16_d *seq16);
<<seq16_functions>>=
static void page_seq16_init(monolith_page *pg, page_seq16_d *seq16)
{
<<seq16_init>>
}

2.4. Seq16 Data Cleanup

Seq16 data is freed with the funciton page_seq16_free.

<<seq16_function_declarations>>=
static void page_seq16_cleanup(page_seq16_d *seq16);
<<seq16_functions>>=
static void page_seq16_cleanup(page_seq16_d *seq16)
{
<<seq16_cleanup>>
}



prev | home | next