1. Every plugin exports three functions
The SDK is a stable C ABI (AMP_PLUGIN_API_VERSION 2). Each plugin is a shared library that
exports amp_plugin_info, amp_plugin_init, and amp_plugin_shutdown —
then additional exports for its type.
// plugin_api.h — metadata returned to the host
typedef struct {
const char* name; // "MC1 Crossfader"
const char* author; // "Mcaster1 Audio"
const char* description;
const char* version; // "1.0.0"
int type; // AMP_PLUGIN_DSP / INPUT / VISUALIZATION / CROSSFADER
int api_version; // must equal AMP_PLUGIN_API_VERSION (2)
} AmpPluginInfo;
// Required by ALL plugin types:
const AmpPluginInfo* amp_plugin_info(void);
int amp_plugin_init(const AmpHostContext* ctx); // return 0 = OK
void amp_plugin_shutdown(void);
2. The host context
amp_plugin_init receives the audio format, a writable per-plugin data dir, and a log callback.
typedef struct {
int sample_rate;
int channels;
int buffer_size; // frames per process call
const char* app_version;
const char* plugin_data_dir; // writable, per-plugin
AmpLogCallback log; // log(level, message)
} AmpHostContext;
3. A DSP effect (type 1)
DSP plugins implement one realtime callback that processes interleaved float PCM in place.
It runs on the audio thread, so it must be allocation- and lock-free.
// REALTIME-SAFE: no alloc, no lock, no IO
void amp_plugin_dsp_process(float* samples, int frames, int channels);
4. Declaring parameters (optional)
Expose named parameters and the host renders a generic UI, persists state, and automates them — no Qt needed.
typedef struct {
const char* name; // key for set/get_param: "gain_db"
const char* label; // "Gain"
const char* unit; // "dB", "%", "Hz", ""
double min_value, max_value, default_value;
int is_enum; // 1 = integer index into enum_names
const char* enum_names; // "Linear|Constant Power|S-Curve"
} AmpParamInfo;
void amp_plugin_set_param(const char* name, double value);
double amp_plugin_get_param(const char* name);
int amp_plugin_get_param_count(void);
const AmpParamInfo* amp_plugin_get_param_info(int index);
5. Input, crossfader & visualization
// Input decoder (type 2)
int amp_plugin_input_can_decode(const char* ext);
void* amp_plugin_input_open(const char* path, int* sr, int* ch);
int amp_plugin_input_read(void* h, float* buf, int maxFrames); // frames; 0=EOF
void amp_plugin_input_close(void* h);
// Crossfader (type 4) — position 0=A, 0.5=equal, 1=B
void amp_plugin_crossfader_blend(const float* a, const float* b,
float* out, int frames, int ch, float position);
// Visualization (type 3)
void amp_plugin_vis_push(const float* samples, int frames, int channels);
6. Build & install
Compile to a shared library with hidden visibility. The SDK zip ships a build/Makefile that picks
the right extension for your OS.
# From the SDK: build a template (or your own source)
cp templates/dsp-plugin-template.c myplugin.c
make -C build SRC=$PWD/myplugin.c OUT=$PWD/myplugin
# Drop the library in your platform's plugins folder:
# macOS ~/Library/Application Support/Mcaster1AMP/plugins/
# Linux ~/.local/share/Mcaster1AMP/plugins/
# Win %APPDATA%\Mcaster1AMP\plugins\
Custom Qt UI
(amp_plugin_create_ui) is only safe when your plugin shares the host's Qt runtime. If you bundle
your own Qt, don't export it — declare parameters instead and the host builds the UI.