@maruaudio/dsp/processors/mpe-ingress turns raw MIDI 1.0 channel messages into identified note events: note-on and note-off with a note id (kinds 5 and 6) and note expressions (kind 7) numbered as CLAP's. Under MIDI Polyphonic Expression it tracks the lower and upper zones, gives each note on a member channel its own id, and maps member pitch bend to tuning (2, in semitones of that channel's bend range), channel pressure to pressure (6, 0 to 1) and CC 74 to brightness (5). A master-channel value is stored per zone and added to each member's own value, so neither replaces the other. It is composed into an instrument's Processor, not shipped as its own module.
Parameters
| Setter | Accepts | Default |
|---|---|---|
configureMpeZone(master, members) | Master 0 (lower) or 15 (upper); members rounded, 0 to 14 | no zone |
setMpeBendRange(channel, semitones) | Stored as given; on a zone master it also sets every member | members 48, master 2 |
setMpeBasicNoteIdentity(on) | Only while no note is tracked; gives ordinary channels ids too | off |
setMpePerformanceWheelMode(on) | Only while no note is tracked; outside zones, bend becomes a wheel read by mpePerformanceWheel | off |
Zone configuration (RPN 6) and bend range (RPN 0) also arrive as messages.
Lifecycle
createMpeIngressState allocates every array → prepareMpeIngress(rate, maximumBlockSize) → mpeIngressPushMessage(status, data1, data2, frame), which only queues → processMpeIngress → emitMpeIngressEvents → resetMpeIngress. Reset drops sounding notes, the queue, stored values and a half-parsed RPN, and keeps the zone layout, MPE mode and bend ranges, since a controller sends its configuration once. forgetMpeConfiguration drops those too, for a disconnected device. releaseAllMpeNotes queues note-offs for a panic or transport stop.
When to use it
An instrument that should respond per note to an MPE controller in hosts and formats that deliver raw MIDI bytes. Formats with native per-note expression, such as CLAP, deliver identified events directly and skip this stage.
Limits
- MPE mode is on while any zone has members; leaving it drops stored zone values. Outside a zone, channel messages keep their basic MIDI meaning and notes have no id unless basic identity is on.
- Poly key pressure is ignored in MPE mode.
- At most 64 tracked notes (beyond that a note goes out without an id) and 256 queued events; a full queue drops.
emitMpeIngressEventsreturnsfalsewhen the caller's output runs out of room, drops the rest and clears the queue either way. Note ids are at most 0xFFFFFF.