jdxi_editor.midi.playback.activity
Playback activity
Whether any transport (the MIDI File Player’s or the Pattern Editor’s) is playing. Editors use it to hold back device requests (RQ1) while playback is sending MIDI, and to make them once it stops.
Example
>>> activity = playback_activity()
>>> activity.playing_changed.connect(lambda playing: print(playing))
>>> activity.is_playing
False
>>> refresher = DeviceRefresher(editor.data_request, editor.isVisible, parent=editor)
>>> refresher.schedule() # after a parameter change on the JD-Xi
Attributes
Classes
Which transports are playing. |
|
Asks the JD-Xi for an editor's values so its UI follows parameter changes |
Functions
|
The application's PlaybackActivity. |
Module Contents
- class jdxi_editor.midi.playback.activity.PlaybackActivity(parent: PySide6.QtCore.QObject | None = None)[source]
Bases:
PySide6.QtCore.QObjectWhich transports are playing.
- Signals:
- playing_changed(bool): True when the first transport starts playing,
False when the last one stops or pauses
- jdxi_editor.midi.playback.activity._activity: PlaybackActivity | None = None[source]
- jdxi_editor.midi.playback.activity.playback_activity() PlaybackActivity[source]
The application’s PlaybackActivity.
- class jdxi_editor.midi.playback.activity.DeviceRefresher(request: Callable[[], None], is_wanted: Callable[[], bool] = lambda : ..., delay_ms: int = REFRESH_DELAY_MS, parent: PySide6.QtCore.QObject | None = None)[source]
Bases:
PySide6.QtCore.QObjectAsks the JD-Xi for an editor’s values so its UI follows parameter changes made on the instrument: once a burst of changes has settled, and never while playback is sending MIDI (it asks once playback stops instead).