7. Grid Interaction
Trig is primarily designed to be controlled from the Grid.
The top level interaction later happens at
trig_press_layer
.
Trig splits the monome up into two squares. The left square is the control panel. The right is the editor for the cell.
<<trig_function_declarations>>=
static void trig_press_top(page_trig_d *trig, int x, int y);
<<trig_functions>>=
static void trig_press_top(page_trig_d *trig, int x, int y)
{
if (x < 8) {
<<control>>
} else {
<<editor>>
}
}
<<control>>=
if (y < 4) {
int word;
word = (y * 8) + x;
select_cell(trig, word);
}
<<editor>>=
toggle_cell(trig, x, y);
prev | home | next