Phase 16: persist sample-timed effect automation and add expressive MIDI controls
This commit is contained in:
parent
f72314b5a3
commit
7fac0a4f6a
23 changed files with 374 additions and 39 deletions
|
|
@ -29,6 +29,8 @@ typedef struct {
|
|||
} xtc_audio_buffer;
|
||||
|
||||
typedef struct xtc_plan xtc_plan;
|
||||
/* Single owner: set absolute automation/native-event position, no allocation. */
|
||||
xtc_result xtc_plan_position(xtc_plan *plan, uint64_t position);
|
||||
|
||||
typedef enum {
|
||||
XTC_NODE_GAIN = 1,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ typedef struct {
|
|||
typedef enum {
|
||||
XTC_MIDI_NOTE_ON = 1,
|
||||
XTC_MIDI_NOTE_OFF,
|
||||
XTC_MIDI_ALL_OFF
|
||||
XTC_MIDI_ALL_OFF,
|
||||
XTC_MIDI_CONTROL /* pitch = CC number, velocity = 0..127 value */
|
||||
} xtc_midi_type;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,11 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
#define XTC_PLUGIN_CONTROLS 16U
|
||||
#define XTC_PLUGIN_POINTS 32U
|
||||
/* Absolute project ticks. Mode belongs to segment starting at this point:
|
||||
* 0 linear, 1 hold/step. Outside a lane hold first/last; later ticks win when
|
||||
* sample rounding collides. Integer/toggle controls require mode 1. */
|
||||
typedef struct { uint64_t tick; unsigned int port, step; float value; } xtc_plugin_point;
|
||||
/* Plain copied model: no library handles or callback pointers. Absolute trusted
|
||||
* module path, descriptor index + unique ID + label checked again on compile.
|
||||
* Controls are actual LADSPA port indices, in ascending order. */
|
||||
|
|
@ -13,6 +18,8 @@ typedef struct {
|
|||
unsigned int index, unique_id, inputs, control_count;
|
||||
unsigned int ports[XTC_PLUGIN_CONTROLS];
|
||||
float values[XTC_PLUGIN_CONTROLS];
|
||||
unsigned int tempo, point_count; /* milli-BPM, 20000..300000 */
|
||||
xtc_plugin_point points[XTC_PLUGIN_POINTS];
|
||||
} xtc_plugin_spec;
|
||||
typedef struct xtc_plugin xtc_plugin;
|
||||
/* Control thread only. Probe explicitly enumerates a file by descriptor index;
|
||||
|
|
@ -29,6 +36,7 @@ void xtc_plugin_destroy(xtc_plugin *plugin); /* control, after quiescence */
|
|||
/* Single audio owner. No loading/allocation/I/O in host process; trusted run()
|
||||
* must obey realtime rules. No MIDI; max one mono input and one mono output.
|
||||
* Transport reset retains LADSPA delay history (no realtime reset contract). */
|
||||
xtc_result xtc_plugin_process_at(xtc_plugin *plugin, const float *input, float *output, size_t frames, uint64_t position);
|
||||
xtc_result xtc_plugin_process(xtc_plugin *plugin, const float *input, float *output, size_t frames);
|
||||
xtc_result xtc_graph_add_plugin(xtc_graph *graph, const xtc_plugin_spec *spec, size_t *id);
|
||||
xtc_result xtc_graph_get_plugin(const xtc_graph *graph, size_t id, xtc_plugin_spec *out);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
typedef struct xtc_realtime xtc_realtime;
|
||||
/* Single audio owner, or stopped/joined control owner: position current/future plans. */
|
||||
xtc_result xtc_realtime_position(xtc_realtime *engine, uint64_t position);
|
||||
|
||||
typedef struct {
|
||||
unsigned int processed_blocks; /* Wraps modulo UINT_MAX + 1. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue