jdxi_editor.midi.sysex.names
Names of SysEx bytes from the JD-Xi address and parameter enums.
Example
>>> from jdxi_editor.midi.data.address.address import CommandID
>>> parse_sysex_byte(0x12, CommandID)
'DT1'
Attributes
Classes
Base class for protocol classes. |
|
Base class for protocol classes. |
Functions
|
Get the name of a SysEx byte value using a given enum class. |
Module Contents
- class jdxi_editor.midi.sysex.names.SysExEnumProtocol[source]
Bases:
ProtocolBase class for protocol classes.
Protocol classes are defined as:
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:
class GenProto(Protocol[T]): def meth(self) -> T: ...
- class jdxi_editor.midi.sysex.names.EnumWithAddress[source]
Bases:
ProtocolBase class for protocol classes.
Protocol classes are defined as:
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:
class GenProto(Protocol[T]): def meth(self) -> T: ...
- jdxi_editor.midi.sysex.names.parse_sysex_byte(byte_value: int, enum_cls: Type[SysExEnumProtocol]) str[source]
Get the name of a SysEx byte value using a given enum class.
Supports both: - address-aware enums (get_parameter_by_address) - value-based enums (IntEnum / Enum)
- Parameters:
byte_value – SysEx byte value
enum_cls – Enum class
- Returns:
name or “COMMON (0x??)” if not found