feat: add ncurses-based TUI frontend with 8x8 clip grid and keyboard controls

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-01 09:48:59 +00:00
parent 9b1959e13d
commit 4573eb0201
5 changed files with 775 additions and 11 deletions

11
main.c
View File

@@ -3,6 +3,7 @@
#include <signal.h>
#include <unistd.h>
#include "engine.h"
#include "tui.h"
static Engine engine;
static volatile int keep_running = 1;
@@ -71,13 +72,13 @@ int main(int argc, char *argv[]) {
printf("Sample rate: %u Hz\n", engine.sample_rate);
printf("Press Ctrl+C to stop\n\n");
// Main loop
while (keep_running) {
sleep(1);
}
// Initialize and run TUI
tui_init(&engine);
tui_run(&engine);
tui_cleanup();
// Cleanup
printf("\nShutting down...\n");
printf("\nShutting down...\n"); // This line may not be reached if tui_run returns
engine_stop(&engine);
engine_cleanup(&engine);