reaper-jsfx-midi
REAPER JSFX MIDI Processing
Patterns for MIDI utility plugins including note processing, arpeggiators, chord generators, and CC manipulation.
Requires: reaper-jsfx-core for language fundamentals.
Rules
| Rule | Description |
|---|---|
| midi-basics | MIDI message structure, receive/send, SysEx handling |
| midi-transform | Note transposition, velocity scaling, CC mapping |
| midi-generate | Arpeggiators, sequencers, chord generators |
| midi-routing | Multi-bus routing, channel filtering, splitting |
Official Documentation
Key Principles
1. MIDI-Only Plugin Structure
desc:MIDI Utility
tags:midi
in_pin:none
out_pin:none
@block
while(midirecv(offset, msg1, msg2, msg3)) (
// Process and forward
midisend(offset, msg1, msg2, msg3);
);
2. Always Forward or Handle All Messages
@block
while(midirecv(offset, msg1, msg2, msg3)) (
status = msg1 & $xF0;
status == $x90 || status == $x80 ? (
// Process notes
process_note(offset, msg1, msg2, msg3);
) : (
// Pass through everything else unchanged
midisend(offset, msg1, msg2, msg3);
);
);
3. Preserve Timing
@block
// Use original offset for timing-critical events
while(midirecv(offset, msg1, msg2, msg3)) (
// Transform but keep original offset
midisend(offset, new_msg1, new_msg2, new_msg3);
);
Quick Reference
| Use Case | Rule |
|---|---|
| Understanding MIDI | midi-basics |
| Transpose / Velocity | midi-transform |
| Arpeggiator | midi-generate |
| Channel Filter | midi-routing |
More from mthines/jsfx-agent-skills
reaper-jsfx-core
Foundation for REAPER JSFX plugin development. Use when writing any JSFX plugin - covers EEL2 language syntax, code sections, special variables, performance optimization, and reusable library patterns. Triggers on requests for JSFX, JS effects, EEL2, or Reaper plugin development.
6reaper-jsfx-ui
Graphics and UI patterns for JSFX plugins. Use when building custom interfaces with knobs, sliders, meters, waveform displays, or spectrum analyzers. Triggers on requests for JSFX graphics, custom UI, visualization, or @gfx implementation.
4reaper-jsfx-synth
Synthesis and instrument patterns for JSFX plugins. Use when building synthesizers, samplers, or virtual instruments. Covers oscillators, envelopes, voice management, and MIDI instrument handling. Triggers on requests for synth, oscillator, ADSR, polyphony, or instrument development in JSFX.
3reaper-jsfx-audio
Audio effects patterns for JSFX plugins. Use when implementing filters, EQs, compressors, limiters, delays, reverbs, distortion, or modulation effects. Triggers on requests for audio effect DSP, equalizer, dynamics processing, or time-based effects in JSFX.
3