This commit is contained in:
Johannes Findeisen 2026-10-28 17:16:01 +01:00
commit 02e27a33a2
47 changed files with 882 additions and 62 deletions

View file

@ -4,7 +4,9 @@
#ifdef __cplusplus
extern "C" {
#endif
typedef enum { XTC_PLUGIN_LADSPA = 0, XTC_PLUGIN_CLAP, XTC_PLUGIN_VST2, XTC_PLUGIN_VST3 } xtc_plugin_format;
typedef enum { XTC_PLUGIN_LADSPA = 0, XTC_PLUGIN_CLAP, XTC_PLUGIN_VST2, XTC_PLUGIN_VST3, XTC_PLUGIN_BUILTIN } xtc_plugin_format;
/* Internal device indices: 0 Soft Keys, 1 Sub Bass, 2 Delay, 3 Reverb. */
#define XTC_BUILTIN_PATH "/xtc/internal"
const char *xtc_plugin_format_name(xtc_plugin_format format);
#define XTC_PLUGIN_CONTROLS 16U
#define XTC_PLUGIN_POINTS 32U
@ -13,7 +15,7 @@ const char *xtc_plugin_format_name(xtc_plugin_format format);
* 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
* binary path, format/index/integer or string identity/label verified on compile.
* binary path (or reserved XTC_BUILTIN_PATH), identity/label verified on compile.
* Controls are LADSPA port indices; modern effects use default configuration
* with zero controls/points. Initialize the complete struct to zero. */
typedef struct {
@ -21,7 +23,7 @@ typedef struct {
xtc_plugin_format format;
char identifier[128]; /* CLAP stable ID / VST3 class hex; empty for LADSPA/VST2. */
unsigned int index, unique_id, inputs, control_count;
unsigned int instrument; /* Modern zero-input note instrument; track binding only. */
unsigned int instrument; /* Zero-input note instrument; track binding only. */
unsigned int ports[XTC_PLUGIN_CONTROLS];
float values[XTC_PLUGIN_CONTROLS];
unsigned int tempo, point_count; /* milli-BPM, 20000..300000 */

View file

@ -7,7 +7,7 @@
extern "C" {
#endif
#define XTC_PROJECT_FORMAT_VERSION 12U
#define XTC_PROJECT_FORMAT_VERSION 13U
#define XTC_PROJECT_MAX_TRACKS 64U
#define XTC_PROJECT_MAX_CLIPS 1024U
#define XTC_PROJECT_NAME_BYTES 64U

View file

@ -14,7 +14,7 @@ typedef struct {
int64_t sequencer_snap, piano_snap, sequencer_zoom;
int64_t clip_ticks, note_ticks, note_velocity, note_channel, filter_channel, filter_low, filter_high;
int64_t tempo, volume_cc, pan_cc, sustain_cc;
int64_t loop_start, loop_end, loop_enabled;
int64_t loop_start, loop_end, loop_enabled, follow_playhead;
} xtc_settings;
typedef struct {
const char *section, *key, *label;