jdxi_editor.midi.sysex.request.read_session
Coordinated RQ1 read session with DT1 address matching and section status.
Used by Patch Manager and per-editor “Read from JD-Xi” actions so saves are not based on stale UI state without an explicit hardware round-trip.
Replies are matched on the raw DT1 bytes from the MIDI input
(midi_message_incoming). The parsed midi_sysex_json signal is not used
when raw input is available: its ADDRESS field is the command byte plus only
three address bytes (e.g. "12194200" for 19 42 00 00), and the same
signal also carries JSON from patch files being loaded, which are not replies.
Attributes
Classes
str(object='') -> str |
|
Status for one expected SysEx section. |
|
Outcome of a full or scoped read session. |
|
Send RQ1s and wait for matching DT1 addresses via |
Functions
|
Normalize an address hex string for comparison (no spaces, lower). |
|
Extract the 4-byte Roland address from an RQ1 SysEx hex string. |
|
4-byte address of a Roland DT1 (data set) message, or None if data is not one. |
|
Normalise the ADDRESS of a parsed-SysEx JSON payload to the 4-byte form. |
|
Human-readable label for a common JD-Xi temporary address. |
|
0-based drum partial of a 19 70 xx 00 address, or None. |
|
JD-Xi RQ1 (data request) for size bytes at address, as hex. |
|
(label, RQ1) for every section of a patch, whichever editors are open. |
|
Build section results from RQ1 hex strings. |
|
Collect (label, rq1_hex) from editors that expose |
|
Convenience: build sections, wire callbacks, and start. |
Module Contents
- class jdxi_editor.midi.sysex.request.read_session.SectionStatus[source]
-
str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- class jdxi_editor.midi.sysex.request.read_session.ReadSectionResult[source]
Status for one expected SysEx section.
- status: SectionStatus[source]
- class jdxi_editor.midi.sysex.request.read_session.ReadResult[source]
Outcome of a full or scoped read session.
- sections: List[ReadSectionResult] = [][source]
- jdxi_editor.midi.sysex.request.read_session.normalize_address(address: str | None) str[source]
Normalize an address hex string for comparison (no spaces, lower).
- jdxi_editor.midi.sysex.request.read_session.address_from_rq1_hex(request_hex: str) str[source]
Extract the 4-byte Roland address from an RQ1 SysEx hex string.
RQ1 layout after the JD-Xi header: command
11, then address (4 bytes), then size (4 bytes), checksum,F7.
- jdxi_editor.midi.sysex.request.read_session.address_from_dt1_bytes(data: Sequence[int]) str | None[source]
4-byte address of a Roland DT1 (data set) message, or None if data is not one.
- jdxi_editor.midi.sysex.request.read_session.address_from_parsed_json(address_field: str | None) str[source]
Normalise the ADDRESS of a parsed-SysEx JSON payload to the 4-byte form.
The parser reports
command + 3 address bytes("12194200"); patch JSON written by the composer uses the 4-byte address ("19420000").
- jdxi_editor.midi.sysex.request.read_session.label_for_address(address: str) str[source]
Human-readable label for a common JD-Xi temporary address.
- jdxi_editor.midi.sysex.request.read_session.drum_partial_index(address: str) int | None[source]
0-based drum partial of a 19 70 xx 00 address, or None.
- jdxi_editor.midi.sysex.request.read_session.rq1_hex(address: Sequence[int], size: Sequence[int]) str[source]
JD-Xi RQ1 (data request) for size bytes at address, as hex.
- jdxi_editor.midi.sysex.request.read_session.patch_section_requests() List[Tuple[str, str]][source]
(label, RQ1) for every section of a patch, whichever editors are open.
Program Common, Vocal FX, Effects, Delay, Reverb, Zones, Arpeggio, both Digital synths (Common, partials, Modify), Analog, Drum Common and all 38 drum partials.
- jdxi_editor.midi.sysex.request.read_session.sections_from_requests(requests: Sequence[str], *, labels: Sequence[str] | None = None) List[ReadSectionResult][source]
Build section results from RQ1 hex strings.
- jdxi_editor.midi.sysex.request.read_session.collect_editor_requests(editors: Iterable[Any], *, skip_types: Tuple[type, ...] | None = None) List[Tuple[str, str]][source]
Collect (label, rq1_hex) from editors that expose
midi_requests.Deduplicates by address (first wins).
- class jdxi_editor.midi.sysex.request.read_session.PatchReadSession(midi_helper, sections: Sequence[ReadSectionResult], *, timeout_ms: int = 8000, parent: PySide6.QtCore.QObject | None = None)[source]
Bases:
PySide6.QtCore.QObjectSend RQ1s and wait for matching DT1 addresses via
midi_sysex_json.Emits
progressas sections update andfinishedwith the finalReadResult(complete, partial, or timed out).- _by_address: Dict[str, ReadSectionResult][source]
- property result: ReadResult[source]
- _on_midi_message(message: Any) None[source]
Raw MIDI input: match DT1 replies by their exact address.
- _on_sysex_json(payload: str) None[source]
Fallback when raw input is unavailable: match parsed-SysEx JSON.
- _tell_connection(result: ReadResult) None[source]
A whole reading: answers arrive; a partial one: some did not (UNSTABLE).
- jdxi_editor.midi.sysex.request.read_session.start_read_session(midi_helper, requests: Sequence[str], *, labels: Sequence[str] | None = None, timeout_ms: int = 8000, on_progress: Callable[[ReadResult], None] | None = None, on_finished: Callable[[ReadResult], None] | None = None, parent: PySide6.QtCore.QObject | None = None) PatchReadSession[source]
Convenience: build sections, wire callbacks, and start.