mpc-plugin-dsp — Claude Code skill for MPC plugin DSP
The mpc-plugin-dsp Claude Code skill guides DSP work on MPC plugins. It applies to changes involving synthesis, effects, MIDI, or plugin parameters.
MIT ★ 200 updated 2026-11-07
npx skills add inmusic-software/mpc-plugin-builder-sdk --skill mpc-plugin-dsp -a claude-codeWhat mpc-plugin-dsp does
The skill guides edits to an MPC plugin’s audio code, including DSP, voices, MIDI handling, parameters, and saved state. It uses the SDK framework and points to framework/mpc_plugin.h, which defines mpc::Plugin. Add new parameters at the end; changing existing parameter order or id strings can alter how MPC sees them.
For synthesis, the guidance uses dsp::VoiceAllocator<8>; effects read inputs and write outputs with a dry/wet mix. The audio callback must not allocate memory, access files, or use mutexes. Load data and prepare coefficients outside process(). After code changes, rebuild and run the host simulator with the mpc-plugin-test skill.
When parameters change, update ui.json and the README parameter list, then bump version in plugin.json. Plugin content files must be redistributable, and their licence belongs in the README.
What it helps with
- add a voice, parameter, or MIDI handler to an MPC plugin
- change a plugin’s synthesis or effect algorithm
- port DSP code into an MPC plugin
- check real-time constraints in
process()
Example prompts for the agent
- Add a volume parameter and connect it to the MPC plugin’s audio processing.
- Port this synthesis algorithm to an MPC plugin using the SDK.
- Fix MIDI handling and check the code in
process().
How to install mpc-plugin-dsp
1Skills CLI (Vercel)
npx skills add inmusic-software/mpc-plugin-builder-sdk --skill mpc-plugin-dsp -a claude-code2Manually: put the files in place
~/.claude/skills/mpc-plugin-dsp/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mpc-plugin-dsp/
1Skills CLI (Vercel)
npx skills add inmusic-software/mpc-plugin-builder-sdk --skill mpc-plugin-dsp -a codex2Manually: put the files in place
.agents/skills/mpc-plugin-dsp/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add inmusic-software/mpc-plugin-builder-sdk --skill mpc-plugin-dsp -a cursor2Manually: put the files in place
.cursor/skills/mpc-plugin-dsp/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install inmusic-software/mpc-plugin-builder-sdk .agents/skills/mpc-plugin-dsp2Manually: put the files in place
.github/skills/mpc-plugin-dsp/SKILL.md1Skills CLI (Vercel)
npx skills add inmusic-software/mpc-plugin-builder-sdk --skill mpc-plugin-dsp -a gemini-cli2Platform CLI
gemini skills install https://github.com/inmusic-software/mpc-plugin-builder-sdk --path .agents/skills/mpc-plugin-dspManually: put the files in place
.devin/skills/mpc-plugin-dsp/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about mpc-plugin-dsp
How do I install mpc-plugin-dsp in Claude Code?
Run npx skills add inmusic-software/mpc-plugin-builder-sdk --skill mpc-plugin-dsp -a claude-code. The skill file is installed at ~/.claude/skills/mpc-plugin-dsp/SKILL.md.
What does mpc-plugin-dsp do?
It guides changes to MPC plugin audio code, covering synthesis, effects, voices, MIDI, parameters, and state. It also gives rules for real-time audio processing.
What restrictions apply inside process()?
Do not allocate memory, access files, use mutexes, or print to the console there. Prepare data and coefficients beforehand.
Source text
SKILL.md · MIT
---
name: mpc-plugin-dsp
description: Write or change the audio code (DSP, voices, MIDI handling, parameters, state) of an MPC plugin using the SDK framework. Use when adding features, fixing sound problems, adding parameters, changing synthesis or effect algorithms, or porting existing DSP to an MPC plugin.
---
# Working on plugin DSP
## Know the framework
Read `framework/mpc_plugin.h` (class `mpc::Plugin`) before editing. Key points:
- Declare parameters in the constructor with `addParam(mpc::floatParam/logParam/intParam/boolParam/choiceParam(...))`; keep the returned index in a member. Order = parameter index = what the MPC sees. Append new parameters at the end; never reorder or rename `id` strings.
- Read values in `process()` with `get(i)` (plain value), `getBool(i)`, `getInt(i)`. Smooth anything audible with `dsp::Smoother`.
- `process(mpc::ProcessContext& ctx)`: `ctx.inputs[ch][i]` (may be null for 0-input instruments), `ctx.outputs[ch][i]` (already zeroed), `ctx.numFrames`, `ctx.midi[0..numMidiEvents)` sorted by `sampleOffset`, `ctx.transport` (bpm, ppqPos, playing), `ctx.sampleRate`.
- `prepare(sampleRate, maxBlock)` allocates and sets coefficients; `reset()` clears state (called on resume and after state load).
- Extra state beyond parameters: `saveExtraState` / `loadExtraState` (byte vector). Built-in presets: `addProgram`.
- **Files shipped with the plugin (samples, wavetables, impulse responses, data tables)**: put them in `plugins/<Name>/Content/` (any subfolders). `build.py` copies that to `Content/` beside `Plugin Skins/`. In code, `#include "dsp/wav.h"` (mpc_plugin.h already pulls in `mpc_resources.h`) and use `mpc::contentPath("Samples/kick.wav")`, `dsp::loadWav(path, wav)` (PCM 8/16/24/32 + float WAV -> float channels), `mpc::readFile` / `mpc::readTextFile` for anything else, `mpc::pluginFolder()` for the plugin folder. The path comes from where the loaded library lives (VST2 gives no other way), never hard-code one. Load in the constructor / `prepare()` / `loadExtraState()`, never in `process()`; keep data in members; if loading fails, fall back to a generated sound. Keep memory small (each instance loads its own copy). Test under `host_sim` works without setup (it finds the project's `Content/`); `MPC_PLUGIN_FOLDER=<dir>` overrides. Only use content you may redistribute and record the licence in the README. See cookbook §11b.
- Custom value text: override `formatValue(index, plain, out)`.
## Patterns
- **Poly synth**: `dsp::VoiceAllocator<8>` + per-voice oscillator/filter/envelopes; render voices into the output, apply master gain. See `examples/SimpleSynth`.
- **Drum instrument**: map notes to voices; one-shot envelopes; multi-out by writing to `ctx.outputs[2..3]`. See `examples/DrumSynth`.
- **Effect**: read `ctx.inputs`, write `ctx.outputs`; dry/wet mix; tempo-sync via `ctx.transport.bpm` and `dsp/tempo.h`. See `examples/StereoDelay`.
- **Sequencer-instrument**: derive the step from `ctx.transport.ppqPos` when `playing`, trigger internal voices; never use wall-clock time.
- **MIDI**: handle `isNoteOn`, `isNoteOff`, `isAllNotesOff`, `isPitchBend` (`pitchBend()` −8192..8191), `isController` (CC 1 mod wheel, 64 sustain). Note-on with velocity 0 is a note-off (`isNoteOff()` already covers it).
## Realtime rules
No `new`/`malloc`/`std::vector::push_back`/`std::string` in `process`; no mutex; no `printf`; no file access. Treat `maxBlockSize` as a ceiling. Check array indices (note numbers 0–127, voice indices, delay reads). Avoid per-sample `std::pow`, `std::exp`, `std::sin` in inner loops; compute coefficients per block or use `dsp/math.h` approximations. Denormals are flushed by the framework.
## Performance budget
One instance should use well under 15% of a Cortex-A17 core at 128 frames / 44.1 kHz. Rough costs: a PolyBLEP oscillator ≈ cheap, a TPT SVF ≈ cheap, `std::sin` per sample ≈ expensive, 8 voices × (2 osc + filter + 2 env) ≈ fine, oversampling ≈ multiply everything.
## After changing code
Rebuild and run the host simulator (`mpc-plugin-test` skill). If you added parameters, update `ui.json` and the README's parameter list, and bump `version` in `plugin.json`.
More: `docs/dsp-cookbook.md`, `docs/host-contract.md`.
© inmusic-software · MIT · inmusic-software/mpc-plugin-builder-sdk