jdxi_editor.ui.midi.selection_info

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

MidiWireInfo

Resolved MIDI address for a program or tone selection.

Functions

channel_display_name(channel[, label]) → str

Format a 0-based channel as Ch N with optional part label.

format_midi_wire_info(info) → str

Format wire info for UI readout or logs.

resolve_program_midi(bank, program_number, *[, ...]) → Optional[MidiWireInfo]

Resolve JD-Xi program bank/number to wire-format MIDI.

resolve_program_midi_from_id(program_id, *[, channel, ...]) → Optional[MidiWireInfo]

Resolve a program id such as A13 or E05.

resolve_tone_midi(preset_id, preset_list, *, channel) → Optional[MidiWireInfo]

Resolve a tone preset id to wire-format MIDI using preset list lookup.

resolve_tone_midi_for_channel(preset_id, preset_list, ...) → Optional[MidiWireInfo]

Resolve tone MIDI with an explicit channel override (cheat / automation).

send_tone_with_expectation(midi_helper, preset_id, ...) → bool

Resolve tone wire info, register validation expectation, and send bank+PC.

send_program_with_expectation(midi_helper, program_id, ...) → bool

Resolve program wire info, register validation expectation, and send bank+PC.

Module Contents

class jdxi_editor.ui.midi.selection_info.MidiWireInfo[source]

Resolved MIDI address for a program or tone selection.

channel: int[source]
bank: jdxi_editor.midi.bank.Bank[source]
program: int[source]
__post_init__() → None[source]
property cc0: int[source]
property cc32: int[source]
property midi_pc: int[source]
property channel_display: str[source]
classmethod from_selection(selection: jdxi_editor.ui.preset.model.ProgramChangeSelection) → MidiWireInfo[source]

Build wire info from a channel + preset selection.

jdxi_editor.ui.midi.selection_info.channel_display_name(channel: int, label: str | None = None) → str[source]

Format a 0-based channel as Ch N with optional part label.

jdxi_editor.ui.midi.selection_info.format_midi_wire_info(info: MidiWireInfo | None) → str[source]

Format wire info for UI readout or logs.

jdxi_editor.ui.midi.selection_info.resolve_program_midi(bank: str, program_number: int, *, channel: int = MidiChannel.PROGRAM, channel_label: str | None = 'Program') → MidiWireInfo | None[source]

Resolve JD-Xi program bank/number to wire-format MIDI.

Parameters:
  • bank – Bank letter A–H

  • program_number – 1-based slot within bank (1–64)

jdxi_editor.ui.midi.selection_info.resolve_program_midi_from_id(program_id: str, *, channel: int = MidiChannel.PROGRAM, channel_label: str | None = 'Program') → MidiWireInfo | None[source]

Resolve a program id such as A13 or E05.

jdxi_editor.ui.midi.selection_info.resolve_tone_midi(preset_id: int | str, preset_list: List[Any], *, channel: int, channel_label: str | None = None) → MidiWireInfo | None[source]

Resolve a tone preset id to wire-format MIDI using preset list lookup.

Parameters:
  • preset_id – Preset number 1–256 (or id string)

  • preset_list – Digital/Analog/Drum LIST or PROGRAM_CHANGE data

  • channel – 0-based MIDI channel for the synth part

jdxi_editor.ui.midi.selection_info.resolve_tone_midi_for_channel(preset_id: int | str, preset_list: List[Any], channel: int, channel_label: str) → MidiWireInfo | None[source]

Resolve tone MIDI with an explicit channel override (cheat / automation).

jdxi_editor.ui.midi.selection_info.send_tone_with_expectation(midi_helper, preset_id: int | str, preset_list: List[Any], channel: int, *, source: str, channel_label: str | None = None) → bool[source]

Resolve tone wire info, register validation expectation, and send bank+PC.

Ensures readout resolver, send parameters, and validation expected match.

jdxi_editor.ui.midi.selection_info.send_program_with_expectation(midi_helper, program_id: str, *, source: str, channel: int = MidiChannel.PROGRAM, channel_label: str | None = 'Program') → bool[source]

Resolve program wire info, register validation expectation, and send bank+PC.