jdxi_editor.midi.io.echo_guard ============================== .. py:module:: jdxi_editor.midi.io.echo_guard .. autoapi-nested-parse:: jdxi_editor.midi.io.echo_guard Stop editors echoing data received from the JD-Xi back to it. When a DT1 reply arrives, editors set their controls from it. Several composite widgets (envelopes, PWM, filter, WMT ranges) send a parameter change for every value set this way, so each reply used to be written back to the synth, sometimes with different values. MidiInHandler delivers device SysEx inside ``device.applying_device_data()`` (see JDXiDevice); while that is active on the current thread, MidiOutHandler drops outgoing DT1 (data set) messages. Requests (RQ1) and other messages still go out, and the scope is per thread, so the request queue's worker is not affected. .. rubric:: Example >>> is_applying_device_data() False >>> with applying_device_data(): ... is_applying_device_data() True Attributes ---------- .. autoapisummary:: jdxi_editor.midi.io.echo_guard.DEFAULT_ECHO_GUARD Classes ------- .. autoapisummary:: jdxi_editor.midi.io.echo_guard.EchoGuard Functions --------- .. autoapisummary:: jdxi_editor.midi.io.echo_guard.applying_device_data jdxi_editor.midi.io.echo_guard.is_applying_device_data jdxi_editor.midi.io.echo_guard.is_device_echo Module Contents --------------- .. py:class:: EchoGuard Per-thread scope in which outgoing DT1s are echoes of received data. .. py:attribute:: _state .. py:method:: applying() -> Iterator[None] Scope in which this thread is applying data received from the JD-Xi. .. py:method:: is_active() -> bool .. py:method:: is_echo(message: Sequence[int]) -> bool True for a DT1 sent while this thread applies data from the JD-Xi. .. py:data:: DEFAULT_ECHO_GUARD .. py:function:: applying_device_data() Scope in which this thread is applying data received from the JD-Xi. .. py:function:: is_applying_device_data() -> bool .. py:function:: is_device_echo(message: Sequence[int]) -> bool True for a DT1 sent while this thread applies data from the JD-Xi.