Plugin API Reference

The host ↔ plugin interface for Mcaster1AMP Plugin SDK v2.

Lifecycle

SymbolDirectionPurpose
mc1_plugin_main()plugin → hostReturns the descriptor; called once at load.
create()host → pluginAllocate state for a sample rate / max block size.
destroy()host → pluginFree state on unload or hot-reload.

DSP interface

CallbackThreadNotes
process(state, in, out, frames)audioReal-time; no allocations, no locks, no syscalls.
set_param(state, id, value)audio/UIAtomic parameter update; keep it wait-free.

Input interface

CallbackReturnsNotes
open(url)intResolve/connect a source; 0 = success.
read(buf, frames)intFill interleaved float PCM; returns frames produced.
close()voidTear down the source.

Output interface

CallbackThreadNotes
write(buf, frames)audioSink the playback bus to a device/encoder.
flush()anyDrain buffers on stop.

Parameters

Each parameter has an id, name, min, max, and def. The host renders a control, persists the value with the project, and may automate it. Read incoming changes via set_param.

Host services

The host exposes a small services struct for logging, sample-rate queries, and (opt-in) access to the AI backends for metadata-aware behavior. Treat all host calls as non-real-time unless documented otherwise.

ABI beta — symbol names may evolve. Pin to MC1_ABI_VERSION and watch the changelog.