· 4 min read

Understanding MIDIHub Rulesets - Parallel Processing for MIDI

Deep dive into MIDIHub's powerful ruleset system. Learn how to filter, transform, and route MIDI messages using parallel processing chains.

Deep dive into MIDIHub's powerful ruleset system. Learn how to filter, transform, and route MIDI messages using parallel processing chains.

MIDIHub’s ruleset system transforms it from a simple MIDI router into a powerful MIDI processor. Whether you want to split a keyboard, layer instruments, or create complex MIDI transformations, understanding rulesets is key to unlocking MIDIHub’s full potential.

What Are Rulesets?

Rulesets are programmable MIDI filters that process messages passing through a port. Every MIDI message can be examined, modified, duplicated, or discarded based on rules you define. Multiple rulesets operate independently on the same incoming data, with all their outputs sent to the port’s destination.

How Parallel Processing Works

MIDIHub processes multiple rulesets in parallel:

         ┌→ Ruleset 1 →┐
MIDI In →├→ Ruleset 2 →├→ MIDI Out
         └→ Ruleset 3 →┘

Each ruleset receives the original MIDI data and processes it independently. All outputs are then sent to the destination port. This parallel approach enables powerful transformations that would be complex to achieve otherwise.

Input Flow Diagram Multiple rulesets process incoming MIDI data in parallel

Output Flow Diagram
Processed results from all rulesets are sent to the output port

Real-World Example: Instrument Layering

Want channel 1 to trigger both a piano (channel 1) and strings (channel 2)?

Set up your rulesets:

  • Main Chain: Pass everything unchanged (channel 1 stays channel 1)
  • Ruleset 2: Filter to only channel 1, remap to channel 2

Result: Every note on channel 1 plays on both channels simultaneously.

Practical Example: Keyboard Splitting

Want to split your keyboard at middle C with bass on the left and lead on the right?

Ruleset 1 - Upper Split (Lead)

  1. Add Custom Rule: IF note < 60 (C4) THEN discard
  2. Add Remap: Transpose -12 (optional, brings lead down an octave)
  3. Keep on channel 1

Ruleset 2 - Lower Split (Bass)

  1. Add Custom Rule: IF note >= 60 THEN discard
  2. Add Remap: Channel 1 → 2
  3. Add Remap: Transpose +12 (optional, brings bass up)

Learn more about the different rule types (Filters, Remaps, and Custom Rules) in our Rule Types Explained guide.

Now your single keyboard controls two different instruments with different ranges!

Advanced Technique: Dynamic Processing

Since rulesets run in parallel, you can create dynamic effects:

Example: Chord Thickening

  • Ruleset 1: Original notes
  • Ruleset 2: Transpose +4 semitones (major third)
  • Ruleset 3: Transpose +7 semitones (perfect fifth)

Play a single note, hear a major triad!

Where to Apply Rulesets

You can add rulesets to both input and output ports:

  • Input ports: Process before routing to outputs
  • Output ports: Process after receiving from inputs

Best practice: Apply rulesets where they minimize MIDI traffic. If multiple outputs need the same processing, do it once at the input.

Testing Your Rulesets

MIDIHub includes built-in testing tools:

  1. Test Generator: Sends random notes through your rulesets
  2. Live Monitor: See exactly what messages come out
  3. Drag to Reorder: Rules within a ruleset apply in order

Common Ruleset Patterns

Channel Doubling

Remap Rule: Channel = "1,2"

Every channel 1 message also goes to channel 2.

Velocity Limiting

Custom Rule: IF velocity > 100 THEN set velocity = 100

Prevent overly loud notes.

Note Range Filter

Custom Rule: IF note < 36 OR note > 84 THEN discard

Only allow notes within a specific range.

Percussion Remapping

Remap Rule: Note 36 = "36,38,42"

One kick drum triggers kick + snare + hihat.

Performance Considerations

  • Empty rulesets pass everything (no processing overhead)
  • More rulesets = more parallel paths = more MIDI output
  • Complex custom rules process faster than multiple simple rules
  • Test with your actual setup - every MIDI configuration is different

Saving Your Work

Always save complex rulesets as presets! You can:

  • Save entire port configurations
  • Set a default preset to load on startup
  • Quickly switch between different processing setups

Debugging Tips

When rulesets aren’t working as expected:

  1. Isolate: Disable all but one ruleset to test individually
  2. Log: Watch the message log to see what’s actually happening
  3. Order matters: Within a ruleset, rules apply sequentially
  4. Check your math: MIDI channels are 1-16 in UI but 0-15 in status bytes
Back to How‑to

Related Posts

View All Posts