jdxi_editor.midi.io.controller
MIDI I/O Controller for JD-Xi
This module provides the MidiIOController class, which facilitates MIDI communication with the Roland JD-Xi synthesizer. It allows users to list, open, and manage MIDI input and output ports, automatically detect JD-Xi ports, and handle MIDI message reception.
Features: - Retrieve available MIDI input and output ports. - Automatically detect JD-Xi MIDI ports. - Open and close MIDI input and output ports by name or index. - Check the status of open MIDI ports. - Set a callback for incoming MIDI messages.
Dependencies: - rtmidi for MIDI communication. - PyQt6.QtCore for QObject-based structure.
- Example Usage:
controller = MidiIOController() controller.open_ports(“JD-Xi MIDI IN”, “JD-Xi MIDI OUT”) print(controller.current_in_port, controller.current_out_port)
Classes
Helper class for MIDI communication with the JD-Xi |
Module Contents
- class jdxi_editor.midi.io.controller.MidiIOController(parent: PySide6.QtCore.QObject)[source]
Bases:
PySide6.QtCore.QObjectHelper class for MIDI communication with the JD-Xi
- property current_in_port: str | None[source]
Get current input port name
- Returns:
Optional[str], MIDI input port name
- property current_out_port: str | None[source]
Get current output port name
- Returns:
Optional[str], MIDI output port name
- get_input_ports() List[str][source]
Get available MIDI input ports
- Returns:
List[str], MIDI input ports
- get_output_ports() List[str][source]
Get available MIDI output ports
- Returns:
List[str], MIDI output ports
- find_jdxi_ports() Tuple[str | None, str | None][source]
Find JD-Xi input and output ports
- Returns:
Tuple[Optional[str], Optional[str]], JD-Xi input and output ports
- open_input(port_name_or_index: str) bool[source]
Open MIDI input port by name or index
- Parameters:
port_name_or_index – str, MIDI input port name or index
- Returns:
bool True if successful, False otherwise
- open_output(port_name_or_index: str) bool[source]
Open MIDI output port by name or index
- Parameters:
port_name_or_index – str
- Returns:
bool True if successful, False otherwise
- open_input_port(port_name_or_index: str) bool[source]
Open MIDI input port by name or index
- Parameters:
port_name_or_index – str
- Returns:
bool