feat: add MIDI clip recording and grid mode support
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
20
tui.c
20
tui.c
@@ -1066,14 +1066,26 @@ static void handle_mouse_event(MEVENT *event) {
|
||||
selected_row = grid_row;
|
||||
selected_col = grid_col;
|
||||
int clip_idx = grid_to_clip_index(selected_grid, selected_row, selected_col);
|
||||
Action action = { .type = ACTION_TRIGGER_CLIP, .data.trigger_clip = { .clip_index = clip_idx } };
|
||||
g_dispatch(action);
|
||||
AppState s = dispatcher_get_state();
|
||||
if (s.show_midi_grid) {
|
||||
Action action = { .type = ACTION_MIDI_CLIP_TRIGGER, .data.midi_clip_trigger = { .clip_index = clip_idx } };
|
||||
g_dispatch(action);
|
||||
} else {
|
||||
Action action = { .type = ACTION_TRIGGER_CLIP, .data.trigger_clip = { .clip_index = clip_idx } };
|
||||
g_dispatch(action);
|
||||
}
|
||||
} else if (event->bstate & BUTTON3_CLICKED) {
|
||||
selected_row = grid_row;
|
||||
selected_col = grid_col;
|
||||
int clip_idx = grid_to_clip_index(selected_grid, selected_row, selected_col);
|
||||
Action action = { .type = ACTION_RESET_CLIP, .data.reset_clip = { .clip_index = clip_idx } };
|
||||
g_dispatch(action);
|
||||
AppState s = dispatcher_get_state();
|
||||
if (s.show_midi_grid) {
|
||||
Action action = { .type = ACTION_MIDI_CLIP_RESET, .data.midi_clip_reset = { .clip_index = clip_idx } };
|
||||
g_dispatch(action);
|
||||
} else {
|
||||
Action action = { .type = ACTION_RESET_CLIP, .data.reset_clip = { .clip_index = clip_idx } };
|
||||
g_dispatch(action);
|
||||
}
|
||||
} else if (event->bstate & BUTTON2_CLICKED) {
|
||||
selected_row = grid_row;
|
||||
selected_col = grid_col;
|
||||
|
||||
Reference in New Issue
Block a user