jdxi_editor.midi.io.data_requests

jdxi_editor.midi.io.data_requests Whether the editor asks the JD-Xi for its current settings.

Editors read the synth’s settings with data requests (Roland RQ1 SysEx) when they open, on program changes and on Refresh. That needs a JD-Xi to answer. In SoundFont mode the sound comes from FluidSynth, and often no JD-Xi is connected at all, so the requests only go unanswered: each one waits for its reply to time out, and the queue backs up.

The choice is stored in QSettings under midi_config/data_requests. Until it has been set, it follows the mode: requests are on with the JD-Xi preset lists and off with “Use SoundFont List”.

Only the automatic requests are switched off. A Read the user asks for explicitly (force=True) is still sent, and so is everything else sent to the synth: parameter changes, program changes and patch writes.

Example

>>> rq1 = bytes.fromhex("F0 41 10 00 00 00 0E 11 19 42 00 00 00 00 00 40 65 F7")
>>> dt1 = bytes.fromhex("F0 41 10 00 00 00 0E 12 19 42 00 00 01 02 22 F7")
>>> without_data_requests([rq1, dt1]) == [dt1]
True

Attributes

DATA_REQUESTS_KEY

Message

Functions

_as_bool(value) → bool

stored_data_requests_setting() → Optional[bool]

The saved choice, or None if it has never been set.

data_requests_enabled() → bool

True if the editor should ask the JD-Xi for its settings: the saved

set_data_requests_enabled(enabled) → None

Save the choice.

is_data_request(message) → bool

True for a Roland RQ1 (a request for data, which needs a reply).

without_data_requests(messages) → list

messages with the RQ1 requests taken out, in order.

Module Contents

jdxi_editor.midi.io.data_requests.DATA_REQUESTS_KEY = 'midi_config/data_requests'[source]
jdxi_editor.midi.io.data_requests.Message[source]
jdxi_editor.midi.io.data_requests._as_bool(value) → bool[source]
jdxi_editor.midi.io.data_requests.stored_data_requests_setting() → bool | None[source]

The saved choice, or None if it has never been set.

jdxi_editor.midi.io.data_requests.data_requests_enabled() → bool[source]

True if the editor should ask the JD-Xi for its settings: the saved choice, or, until one is made, on unless SoundFont mode is on.

jdxi_editor.midi.io.data_requests.set_data_requests_enabled(enabled: bool) → None[source]

Save the choice.

jdxi_editor.midi.io.data_requests.is_data_request(message: Message) → bool[source]

True for a Roland RQ1 (a request for data, which needs a reply).

jdxi_editor.midi.io.data_requests.without_data_requests(messages: Iterable[Message]) → list[source]

messages with the RQ1 requests taken out, in order.