Nodes/Jovi_MIDI/MIDI FILTER (JOV_MIDI)
ComfyUI Node

MIDI FILTER (JOV_MIDI)

'1, 5-10, 50-'

By Amorano·Created 2 years ago·Updated about a year ago· 5
MIDI FILTER (JOV_MIDI)
  • MIDI
  • MIDI
  • TRIGGER
MODEIGNORE
CHANNEL
CONTROL
NOTE
VALUE
NORMALIZE

MIDI FILTER is the gatekeeper. It takes a JMIDIMSG, decides whether that message is one you care about, and tells you with a single boolean. It doesn't destroy data - the message always passes through on the MIDI output - it just flips TRIGGER to true only when the message matches every condition you set. That boolean is the whole point: wire it into anything that takes a true/false and your workflow now reacts to your controller.

The mechanism is a range parser, and it's the one genuinely clever bit in this pack. Each of the filter fields - CHANNEL, CONTROL, NOTE, VALUE, and NORMALIZE - is a string that supports ranges, exactly as the README documents:

  • "1, 2" - single values (equals)
  • "5-10" - closed range, inclusive
  • "-100" - open range, less than or equal to 100
  • "50-" - open range, greater than or equal to 50

So "let through notes 60, 64, and everything from 72 to 84" is literally 60, 64, 72-84. Leave a field blank and that criterion is ignored. There's also MODE, a dropdown of NOTE_ON / NOTE_OFF / IGNORE - it filters on note state first, before any of the numeric checks.

All the criteria combine with AND logic, and TRIGGER only fires when they all pass. NORMALIZE filters against the 0–1 scaled value, which is handy for saying "only respond when the knob is more than halfway" - that's 0.5-. Everything about the filter's behavior is straight from the author's __filter() parser in the source, so it's stable and worth trusting.

When would you use the full FILTER over the EZ version? When you need more than "does this equal exactly one number." The string syntax is more powerful and it also adds the NORMALIZE field, which EZ doesn't have. It's a little fiddly - the author ships a simpler sibling precisely because people bounce off the syntax - but if you're doing real controller work, this is the node. (One harmless quirk: the code's output tooltips are copy-paste leftovers that mention "blurriness" on a MIDI node. Ignore them; the outputs are MIDI and TRIGGER.)

Setting it up

Same pack install as the rest of Jovi_MIDI - ComfyUI Manager, search Jovi_MIDI, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Amorano/Jovi_MIDI.git
pip install -r requirements.txt

Then restart ComfyUI and reconnect. The typical chain is READER → FILTER → TRIGGER feeding a gate, or READER → FILTER → MESSAGE to decode whatever survived. If TRIGGER never fires, check your syntax first - a mistyped range is silently skipped by the parser, and you'll just get false with no error to chew on.

CategoryJOV_MIDI 🎛️

Inputs (7)

NameTypeDefaultDescription
MIDIoptJMIDIMSG
MODEoptCOMBOIGNORE3 options: NOTE_OFF, NOTE_ON, IGNORE
CHANNELoptSTRING
CONTROLoptSTRING
NOTEoptSTRING
VALUEoptSTRING
NORMALIZEoptSTRING

Outputs (2)

NameTypeDescription
MIDIJMIDIMSG
TRIGGERBOOLEAN