From apc-mini-tools
TypeScript and Node.js code samples for APC Mini MK2 development. Use when user needs "code example", "implementation", "easymidi", "@julusian/midi", "sample code", "how to implement", or wants working code for LED control, button handling, or MIDI communication.
How this skill is triggered — by the user, by Claude, or both
Slash command
/apc-mini-tools:apc-code-samplesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Quick start examples. For complete implementation details, see [reference.md](reference.md).
Quick start examples. For complete implementation details, see reference.md.
# Rapid development
npm install easymidi && npm install -D @types/easymidi
# Production
npm install @julusian/midi
import easymidi from 'easymidi';
const createConnection = () => ({
output: new easymidi.Output('APC mini mk2'),
input: new easymidi.Input('APC mini mk2')
} as const);
// Red at full brightness (channel 6)
const setPad = (output: Output, note: number, velocity: number, channel = 6): void =>
output.send('noteon', { note, velocity, channel });
// Turn off
const setPadOff = (output: Output, note: number): void =>
output.send('noteon', { note, velocity: 0, channel: 0 });
const onPadPress = (input: Input, callback: (pad: number) => void): void =>
input.on('noteon', (msg) => {
if (msg.note < 64 && msg.velocity > 0) callback(msg.note);
});
const onTrackButton = (input: Input, callback: (track: number) => void): void =>
input.on('noteon', (msg) => {
if (msg.note >= 100 && msg.note <= 107) callback(msg.note - 99);
});
const onSceneButton = (input: Input, callback: (scene: number) => void): void =>
input.on('noteon', (msg) => {
if (msg.note >= 112 && msg.note <= 119) callback(msg.note - 111);
});
const onFader = (input: Input, callback: (fader: number, value: number) => void): void =>
input.on('cc', (msg) => {
if (msg.controller >= 48 && msg.controller <= 56) {
callback(msg.controller - 47, msg.value);
}
});
const encodeRGB = (v: number): readonly [number, number] =>
[(v >> 7) & 0x01, v & 0x7F] as const;
const setRGB = (output: Output, pad: number, r: number, g: number, b: number): void =>
output.send('sysex', [
0xF0, 0x47, 0x7F, 0x4F, 0x24, 0x00, 0x08,
pad, pad, ...encodeRGB(r), ...encodeRGB(g), ...encodeRGB(b),
0xF7
]);
const Colors = {
OFF: 0, WHITE: 3, RED: 5, ORANGE: 9, YELLOW: 13,
GREEN: 21, CYAN: 33, BLUE: 45, PURPLE: 49, MAGENTA: 53
} as const;
npx claudepluginhub naporin0624/claude-plugin-apc-mini --plugin apc-mini-toolsProvides techniques and best practices for Max for Live development, including Live Object Model access with live.path/object/observer, device namespaces, pattr persistence, and Push2 mapping.
Adds or updates a music layer (drums, bass, melody, chords, etc.) in a live-coding jam session using Strudel synthesis. Users specify a role and prompt; the skill generates Strudel code and sends it via MCP tools.
Generates Strudel.cc code for live-coding musical patterns, drum sequences, melodies, basslines, and compositions. Provides browser-ready copy-paste code and base64-encoded shareable URLs.