Phase 16: persist sample-timed effect automation and add expressive MIDI controls

This commit is contained in:
Johannes Findeisen 2026-10-27 06:25:30 +01:00
commit 7fac0a4f6a
23 changed files with 374 additions and 39 deletions

View file

@ -174,6 +174,8 @@ xtc_result xtc_project_set_graph(xtc_project *project, const xtc_graph *source)
copy->require_output_nodes = source->require_output_nodes;
memcpy(copy->nodes, source->nodes, source->node_count * sizeof(*copy->nodes));
memcpy(copy->edges, source->edges, source->edge_count * sizeof(*copy->edges));
{ size_t i; for (i = 0; i < copy->node_count; ++i)
if (copy->nodes[i].type == XTC_NODE_PLUGIN) copy->nodes[i].plugin.tempo = project->tempo; }
xtc_graph_destroy(project->graph);
project->graph = copy;
return XTC_OK;
@ -446,6 +448,8 @@ xtc_result xtc_project_set_tempo(xtc_project *project, unsigned int tempo)
if (project == NULL || tempo < 20000U || tempo > 300000U)
return XTC_ERR_INVALID_ARGUMENT;
project->tempo = tempo;
{ size_t i; for (i = 0; i < project->graph->node_count; ++i)
if (project->graph->nodes[i].type == XTC_NODE_PLUGIN) project->graph->nodes[i].plugin.tempo = tempo; }
return XTC_OK;
}