jdxi_editor.ui.midi.selection_info ================================== .. py:module:: jdxi_editor.ui.midi.selection_info .. autoapi-nested-parse:: MIDI wire-format resolution for program and tone combo readouts. Channel values are 0-based internally (MidiChannel enum). Display uses 1-based channel numbers (Ch 1–16). CC0 and CC32 are bank-select values (MSB/LSB). Classes ------- .. autoapisummary:: jdxi_editor.ui.midi.selection_info.MidiWireInfo Functions --------- .. autoapisummary:: jdxi_editor.ui.midi.selection_info.channel_display_name jdxi_editor.ui.midi.selection_info.format_midi_wire_info jdxi_editor.ui.midi.selection_info.resolve_program_midi jdxi_editor.ui.midi.selection_info.resolve_program_midi_from_id jdxi_editor.ui.midi.selection_info.resolve_tone_midi jdxi_editor.ui.midi.selection_info.resolve_tone_midi_for_channel jdxi_editor.ui.midi.selection_info.send_tone_with_expectation jdxi_editor.ui.midi.selection_info.send_program_with_expectation Module Contents --------------- .. py:class:: MidiWireInfo Resolved MIDI address for a program or tone selection. .. py:attribute:: channel :type: int .. py:attribute:: bank :type: jdxi_editor.midi.bank.Bank .. py:attribute:: program :type: int .. py:method:: __post_init__() -> None .. py:property:: cc0 :type: int .. py:property:: cc32 :type: int .. py:property:: midi_pc :type: int .. py:property:: channel_display :type: str .. py:method:: from_selection(selection: jdxi_editor.ui.preset.model.ProgramChangeSelection) -> MidiWireInfo :classmethod: Build wire info from a channel + preset selection. .. py:function:: channel_display_name(channel: int, label: Optional[str] = None) -> str Format a 0-based channel as ``Ch N`` with optional part label. .. py:function:: format_midi_wire_info(info: Optional[MidiWireInfo]) -> str Format wire info for UI readout or logs. .. py:function:: resolve_program_midi(bank: str, program_number: int, *, channel: int = MidiChannel.PROGRAM, channel_label: Optional[str] = 'Program') -> Optional[MidiWireInfo] Resolve JD-Xi program bank/number to wire-format MIDI. :param bank: Bank letter A–H :param program_number: 1-based slot within bank (1–64) .. py:function:: resolve_program_midi_from_id(program_id: str, *, channel: int = MidiChannel.PROGRAM, channel_label: Optional[str] = 'Program') -> Optional[MidiWireInfo] Resolve a program id such as ``A13`` or ``E05``. .. py:function:: resolve_tone_midi(preset_id: Union[int, str], preset_list: List[Any], *, channel: int, channel_label: Optional[str] = None) -> Optional[MidiWireInfo] Resolve a tone preset id to wire-format MIDI using preset list lookup. :param preset_id: Preset number 1–256 (or id string) :param preset_list: Digital/Analog/Drum LIST or PROGRAM_CHANGE data :param channel: 0-based MIDI channel for the synth part .. py:function:: resolve_tone_midi_for_channel(preset_id: Union[int, str], preset_list: List[Any], channel: int, channel_label: str) -> Optional[MidiWireInfo] Resolve tone MIDI with an explicit channel override (cheat / automation). .. py:function:: send_tone_with_expectation(midi_helper, preset_id: Union[int, str], preset_list: List[Any], channel: int, *, source: str, channel_label: Optional[str] = None) -> bool Resolve tone wire info, register validation expectation, and send bank+PC. Ensures readout resolver, send parameters, and validation expected match. .. py:function:: send_program_with_expectation(midi_helper, program_id: str, *, source: str, channel: int = MidiChannel.PROGRAM, channel_label: Optional[str] = 'Program') -> bool Resolve program wire info, register validation expectation, and send bank+PC.