jdxi_editor.midi.sysex.device

JD-Xi Device Information Module

This module defines the DeviceInfo class, which represents identity information for a Roland JD-Xi synthesizer. It provides utilities for checking manufacturer and model identity, extracting firmware version, and constructing an instance from a MIDI Identity Reply message.

Usage Example:

>>> identity_data = bytes([0xF0, 0x7E, 0x10, 0x06, 0x02, 0x41, 0x0E, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xF7])
>>> device = DeviceInfo.from_identity_reply(identity_data)
>>> device is not None
True
>>> device.version_string
'v0.03'
>>> device.is_jdxi
True

Classes:

  • DeviceInfo: Represents JD-Xi device information, including manufacturer, model, and firmware version. Provides utility properties for checking if the device is a JD-Xi and formatting the version string.

Methods:

  • from_identity_reply(data: bytes) -> Optional[DeviceInfo]

    Parses a MIDI Identity Reply message to create a DeviceInfo instance.

  • is_roland -> bool

    Returns True if the device manufacturer is Roland.

  • is_jdxi -> bool

    Returns True if the device is identified as a JD-Xi.

  • version_string -> str

    Returns the firmware version as a formatted string.

Dependencies:

  • dataclasses

  • typing (List, Optional)

Classes

DeviceInfo

JD-Xi device information parser from MIDI Identity Reply.

Module Contents

class jdxi_editor.midi.sysex.device.DeviceInfo[source]

JD-Xi device information parser from MIDI Identity Reply.

device_id: int[source]
manufacturer: List[int][source]
family: List[int][source]
model: List[int][source]
version: List[int][source]
property is_roland: bool[source]

Check if the device is from Roland.

property is_jdxi: bool[source]

Check if the device is a JD-Xi.

property version_string: str[source]

Format the version number as a string (e.g., ‘v1.03’).

property to_string: str[source]

Generate a readable string describing the device.

classmethod from_identity_reply(data: bytes) DeviceInfo | None[source]

Parse an Identity Reply SysEx message into a DeviceInfo object.

Parameters:

data – bytes

Returns:

DeviceInfo