jdxi_editor.midi.message package
Subpackages
Submodules
jdxi_editor.midi.message.channel module
jdxi_editor.midi.message.control_change module
jdxi_editor.midi.message.identity_request module
jdxi_editor.midi.message.jdxi module
jdxi_editor.midi.message.midi module
MIDI Message Module
This module provides a base class for handling MIDI messages in a structured manner. It defines the Message class, which serves as the foundation for various types of MIDI messages, ensuring proper formatting and conversion to MIDI-compliant byte sequences.
- Classes:
Message: Base class for MIDI messages, enforcing structure and conversion methods.
- Features:
Provides constants for MIDI message handling (status mask, channel mask, max value).
Ensures subclass implementation of the to_list method for MIDI byte conversion.
Offers utility methods for converting messages to bytes and hexadecimal string format.
- Usage Example:
>>> class NoteOnMessage(MidiMessage): ... def to_list(self): ... return [0x90, 60, 100] # Note On for Middle C with velocity 100 ... >>> msg = NoteOnMessage() >>> msg.to_bytes().hex() '903c64' >>> msg.to_hex_string() '90 3C 64'