Skip to content

Main content

MIDI Pitch Bend Centered Byte Pair

Encode a signed centered MIDI pitch-bend integer to least/most-significant seven-bit data bytes; no bend-range assumption.

Loading tool…

Description

Encode a signed centered MIDI pitch-bend integer to least/most-significant seven-bit data bytes; no bend-range assumption.

MIDI 1.0 channel messages use a status byte identifying a message type and a channel, followed by one or two seven-bit data bytes. This family uses channel indexes 0–15 and raw program values 0–127. Raw message bytes do not include musical timing, instrument state or a MIDI file container.1

Encode a signed centered MIDI pitch-bend integer to least/most-significant seven-bit data bytes; no bend-range assumption.

When to use this tool

Use this tool to encode a signed centered MIDI pitch-bend integer to least/most-significant seven-bit data bytes; no bend-range assumption.

How to use the tool and how it works

  1. Enter centered using the field definitions below.
  2. Run the operation. Correct input errors before interpreting an output.
  3. Read result.lsb, result.msb. Use the ordering, boundary rules and absence conditions described below.

Add 8192 to a centered integer, then return its remainder modulo 128 as lsb and its quotient as msb.2

Input fieldMeaning and unitsAccepted input
centeredCentered pitch-bend integer, −8192 through 8191.A finite safe integer within the operation’s stated bounds.
Output fieldInterpretation
resultObject containing the named fields below.
result.lsbLeast-significant seven-bit data component.
result.msbMost-significant seven-bit data component.
json
{
  "input": {
    "centered": -8192
  },
  "output": {
    "result": {
      "lsb": 0,
      "msb": 0
    }
  }
}

Limitations and assumptions

  • Input must lie from −8192 through 8191; this does not choose a channel or pitch-bend range.
  • Message data bytes must be integers 0–127 and channel statuses 128–239. Channels are zero-based; this family does not implement MIDI 2.0 UMP, audio synthesis or a complete timed MIDI file.
  • Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.

Alternative or Complementary methods

Separate channel-message encoding from timing, running status and device interpretation. Use a MIDI sequencer or full file/stream parser when those additional layers matter.

References

  1. Summary of MIDI 1.0 Messages — The MIDI Association

  2. Tool behavior and example: MIDI Pitch Bend Centered Byte Pair — tool.io

Similar or alternative tools

  • MIDI Pitch Bend Centered Integer

    Decode MIDI pitch-bend data bytes to signed centered -8192..8191 integer displacement; not a semitone range conversion.

  • MIDI Channel Message Byte Count

    Return required MIDI 1.0 channel-message byte counts from an explicit status, excluding running-status omission and system messages.