wip state

This commit is contained in:
2025-09-28 22:58:40 +02:00
parent 8762abe508
commit 4c2ce542e7
4 changed files with 49 additions and 5 deletions
+6 -3
View File
@@ -203,9 +203,8 @@ static void key_callback(Window *window, int key,
}
static void midi_callback(unsigned char code, float value) {
log_debug("midi: %d %.2f", code, value);
midi_write(midi, code, value);
// TODO treat in state file
state_apply_event(context, state_config, program.frag_count, midi, code,
value);
}
static void loop(bool hr) {
@@ -268,6 +267,10 @@ void forge_run(Parameters params) {
if (!midi_background_listen(midi, context, midi_callback)) {
return;
}
if (!state_background_midi_write(context, state_config, midi)) {
return;
}
}
window_startup(error_callback);