· 4 min read

MIDIHub Rule Types Explained - Delay, Filters, Remaps, and Custom Rules

Learn about the four types of rules in MIDIHub - Delay, Filters, Remap/Filters, and Custom Rules. Master each type to build powerful MIDI transformations.

Learn about the four types of rules in MIDIHub - Delay, Filters, Remap/Filters, and Custom Rules. Master each type to build powerful MIDI transformations.

MIDIHub offers four distinct rule types that you can combine within rulesets to process MIDI messages. Each type serves a specific purpose and understanding when to use each one will help you create efficient MIDI processing chains.

The Four Rule Types

1. Delay - Time-Based Processing

The Delay rule adds a time delay to MIDI messages passing through. You can specify delays in milliseconds to create echo effects, compensate for timing differences, or build rhythmic patterns.

Common use cases:

  • Create MIDI echo/delay effects
  • Compensate for latency between devices
  • Build arpeggiation patterns
  • Stagger note timing for humanization

Example: Add a 50ms delay to create a subtle echo effect, or use multiple rulesets with different delays to create cascading note patterns.

2. Filters - Simple Message Type Control

Filters are the simplest rules - they act as on/off switches for specific MIDI message types. When you add a Filter rule, you’ll see a list of MIDI message types with checkboxes. Ticked items are discarded, unticked items pass through.

Available filter options:

  • Note Off
  • Note On
  • Aftertouch (Polyphonic Key Pressure)
  • Control Change
  • Program Change
  • Channel Pressure (Channel Aftertouch)
  • Pitch Bend Change
  • System Exclusive
  • MIDI Time Code Quarter Frame
  • Song Position Pointer
  • Song Select
  • Tune Request
  • End of Exclusive
  • Timing Clock
  • Start
  • Continue
  • Stop
  • Active Sensing
  • Reset

Common use cases:

  • Block SysEx messages that might confuse certain apps
  • Remove bandwidth-heavy messages like active sensing or clock
  • Pass only note messages for a pure performance signal
  • Filter out aftertouch from keyboards that send too much data

Example: If you’re experiencing lag with a particular app, try filtering out Active Sensing and MIDI Clock messages - they’re often unnecessary and can clog up the data stream.

3. Remap/Filters - Value-Based Transformations

Remap/Filter rules let you transform or discard messages based on their values. You can remap channels, transpose notes, adjust velocities, and more. Leave a field empty to filter out those specific values.

Available remap types:

  • Channel: Remap MIDI channels (1-16)
  • Note: Transpose or remap specific notes
  • Velocity: Scale or fix velocity values
  • Polyphonic Aftertouch: Remap aftertouch messages
  • Control Change: Convert one CC to another
  • Program Change: Remap program numbers
  • Channel Aftertouch: Transform aftertouch values

Power features:

  • Use comma-separated values to duplicate: “1,2,3” sends to channels 1, 2, and 3
  • Leave empty to filter out specific values
  • Combine multiple remap rules for complex transformations

Examples:

  • Channel “1” → “1,2” duplicates all channel 1 messages to channel 2
  • Note “60” → “60,64,67” turns middle C into a major triad
  • Velocity ”*” → “100” fixes all velocities to 100
  • CC “1” → “11” converts mod wheel to expression

Learn more about remapping in our Remap Channels guide.

4. Custom Rules - Byte-Level Control

Advanced byte-level MIDI manipulation with IF/THEN logic. Learn more in the Custom Rules guide.

Rule structure:

IF (condition1 [AND condition2] [AND ...]) 
THEN (action1 [action2] [...])

Conditions can check:

  • Status byte (message type and channel)
  • Data byte 1 (note number, CC number)
  • Data byte 2 (velocity, CC value)
  • Ranges and specific values

Actions can:

  • Modify any byte value
  • Perform math operations (+, -, *, /)
  • Create entirely new messages
  • Discard the message

MIDI byte reference:

  • Note On: 144-159 (144 + channel 0-15)
  • Note Off: 128-143 (128 + channel 0-15)
  • CC: 176-191 (176 + channel 0-15)
  • Program Change: 192-207 (192 + channel 0-15)

Example custom rules:

Velocity limiter:

IF status >= 144 AND status <= 159 AND byte2 > 100
THEN set byte2 = 100

Note range filter:

IF byte1 < 36 OR byte1 > 84
THEN discard

Velocity curve:

IF status >= 144 AND status <= 159
THEN set byte2 = byte2 * 0.7

Combining Rule Types

Rules within a ruleset apply sequentially. Here’s an effective order:

  1. Filters first - Remove unwanted message types early to reduce processing
  2. Remap/Filters next - Transform channels, notes, CCs
  3. Delay - Apply timing changes to the filtered/remapped messages
  4. Custom rules last - Fine-tune with byte-level control

You can stack multiple rules of the same type - for example, use several Remap rules to transform different aspects of your MIDI data, or chain multiple Custom rules for complex processing. Each rule processes the output of the previous rule.

Practical Rule Patterns

For practical examples and patterns using these rule types, check out our Use Cases page which includes routing patterns, ruleset examples, and tips for common MIDI processing scenarios.

Tips for Success

  1. Start simple - Use Filters and Remaps before diving into Custom rules
  2. Test incrementally - Add one rule at a time and test
  3. Watch the log - MIDIHub shows exactly what’s happening to your messages
  4. Remember byte values - Channels are 1-16 in UI but 0-15 in status bytes
  5. Order matters - Rules apply sequentially within each ruleset

When to Use Each Type

Use Delay when:

  • Creating echo or delay effects
  • Compensating for device latency
  • Building rhythmic patterns
  • Humanizing MIDI sequences

Use Filters when:

  • You need to block entire message types
  • Dealing with app compatibility issues
  • Reducing MIDI bandwidth

Use Remap/Filters when:

  • Changing channels or transposing notes
  • Duplicating messages to multiple destinations
  • Simple value transformations

Use Custom Rules when:

  • You need conditional logic
  • Performing math operations
  • Creating complex transformations
  • Nothing else can achieve what you need
Back to How‑to

Related Posts

View All Posts