jdxi_editor.midi.io.data_requests ================================= .. py:module:: jdxi_editor.midi.io.data_requests .. autoapi-nested-parse:: 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. .. rubric:: 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 ---------- .. autoapisummary:: jdxi_editor.midi.io.data_requests.DATA_REQUESTS_KEY jdxi_editor.midi.io.data_requests.Message Functions --------- .. autoapisummary:: jdxi_editor.midi.io.data_requests._as_bool jdxi_editor.midi.io.data_requests.stored_data_requests_setting jdxi_editor.midi.io.data_requests.data_requests_enabled jdxi_editor.midi.io.data_requests.set_data_requests_enabled jdxi_editor.midi.io.data_requests.is_data_request jdxi_editor.midi.io.data_requests.without_data_requests Module Contents --------------- .. py:data:: DATA_REQUESTS_KEY :value: 'midi_config/data_requests' .. py:data:: Message .. py:function:: _as_bool(value) -> bool .. py:function:: stored_data_requests_setting() -> Optional[bool] The saved choice, or None if it has never been set. .. py:function:: data_requests_enabled() -> bool 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. .. py:function:: set_data_requests_enabled(enabled: bool) -> None Save the choice. .. py:function:: is_data_request(message: Message) -> bool True for a Roland RQ1 (a request for data, which needs a reply). .. py:function:: without_data_requests(messages: Iterable[Message]) -> list `messages` with the RQ1 requests taken out, in order.