jdxi_editor.ui.windows.jdxi.follow

jdxi_editor.ui.windows.jdxi.follow The instrument window follows the JD-Xi.

What is changed on the instrument itself reaches the window:

  • at start (once the MIDI ports are open) the window reads the program, the four tones and the Digital partials, so it does not start on “Init Tone”

  • the part shown (Digital 1, Digital 2, Analog, Drums) is read again every couple of seconds: a tone chosen with the JD-Xi’s own buttons appears on the display, the OCTAVE buttons light as on the instrument and the panel sliders move to the tone’s values. Nothing is read while a MIDI file or pattern plays, while the app is minimised, or for a few seconds after a click, a key or a value sent from the app (a reply on its way must not undo what was just set)

  • a program change from the JD-Xi on a part’s channel reads that part at once

  • the notes played on the JD-Xi light the window’s keys, and their channel tells the part selected on the JD-Xi: the window selects it too

The replies go through the usual path (tone names, editors), so an editor that is open follows too.

Attributes

STARTUP_DELAY_MS

POLL_INTERVAL_MS

QUIET_AFTER_INPUT_S

SYSTEM_COMMON

ROLAND_DT1

TEMPORARY_TONE

TEMPORARY_PROGRAM

PARTIAL_1

PARTS

DIGITAL_COMMON_OCTAVE

ANALOG_OCTAVE

ZONE_OCTAVE

OCTAVE_CENTRE

FOLLOW_NOTES

FOLLOW_PAUSE_S

DIGITAL_SLIDERS

ANALOG_SLIDERS

KNOB_CC

KNOB_CC_EFFECTS

KNOB_NRPN

NRPN_NULL

PART_REQUESTS

Classes

InstrumentFollower

Keeps the instrument window in step with the JD-Xi (see the module doc).

Functions

_zone_request(area) → str

parse_dt1(data) → Optional[tuple]

(address, values) of a Roland DT1 from the JD-Xi (SysEx data without F0/F7).

_value_at(address, values, block, offset) → Optional[int]

The byte at block + offset if this DT1 (at address) holds it.

Module Contents

jdxi_editor.ui.windows.jdxi.follow.STARTUP_DELAY_MS = 1200[source]
jdxi_editor.ui.windows.jdxi.follow.POLL_INTERVAL_MS = 2000[source]
jdxi_editor.ui.windows.jdxi.follow.QUIET_AFTER_INPUT_S = 3.0[source]
jdxi_editor.ui.windows.jdxi.follow.SYSTEM_COMMON = (2, 0, 0)[source]
jdxi_editor.ui.windows.jdxi.follow.ROLAND_DT1 = (65, 16, 0, 0, 0, 14, 18)[source]
jdxi_editor.ui.windows.jdxi.follow.TEMPORARY_TONE = 25[source]
jdxi_editor.ui.windows.jdxi.follow.TEMPORARY_PROGRAM = 24[source]
jdxi_editor.ui.windows.jdxi.follow.PARTIAL_1 = 32[source]
jdxi_editor.ui.windows.jdxi.follow.PARTS[source]
jdxi_editor.ui.windows.jdxi.follow.DIGITAL_COMMON_OCTAVE = 21[source]
jdxi_editor.ui.windows.jdxi.follow.ANALOG_OCTAVE = 52[source]
jdxi_editor.ui.windows.jdxi.follow.ZONE_OCTAVE = 25[source]
jdxi_editor.ui.windows.jdxi.follow.OCTAVE_CENTRE = 64[source]
jdxi_editor.ui.windows.jdxi.follow.FOLLOW_NOTES = 3[source]
jdxi_editor.ui.windows.jdxi.follow.FOLLOW_PAUSE_S = 2.0[source]
jdxi_editor.ui.windows.jdxi.follow.DIGITAL_SLIDERS[source]
jdxi_editor.ui.windows.jdxi.follow.ANALOG_SLIDERS[source]
jdxi_editor.ui.windows.jdxi.follow.KNOB_CC[source]
jdxi_editor.ui.windows.jdxi.follow.KNOB_CC_EFFECTS[source]
jdxi_editor.ui.windows.jdxi.follow.KNOB_NRPN[source]
jdxi_editor.ui.windows.jdxi.follow.NRPN_NULL = 127[source]
jdxi_editor.ui.windows.jdxi.follow._zone_request(area: str) → str[source]
jdxi_editor.ui.windows.jdxi.follow.PART_REQUESTS[source]
jdxi_editor.ui.windows.jdxi.follow.parse_dt1(data) → tuple | None[source]

(address, values) of a Roland DT1 from the JD-Xi (SysEx data without F0/F7).

jdxi_editor.ui.windows.jdxi.follow._value_at(address: tuple, values: list, block: tuple, offset: int) → int | None[source]

The byte at block + offset if this DT1 (at address) holds it.

class jdxi_editor.ui.windows.jdxi.follow.InstrumentFollower(window, parent: PySide6.QtCore.QObject | None = None)[source]

Bases: PySide6.QtCore.QObject

Keeps the instrument window in step with the JD-Xi (see the module doc).

window[source]
midi_helper[source]
_last_input = 0.0[source]
_lit: Dict[tuple, object][source]
_tone_octave: Dict[str, int][source]
_zone_octave: Dict[str, int][source]
_part = None[source]
_recent_channels: list = [][source]
_part_followed_at = -2.0[source]
_nrpn: Dict[int, list][source]
timer[source]
start() → None[source]
stop() → None[source]

The program is closing: no more readings.

read_all() → None[source]

Program, tones and partials: what the window shows at start.

_connected() → bool[source]
_quiet() → bool[source]

Nothing in the way of a reading: no playback, no recent input, app shown.

current_part()[source]
poll() → None[source]

Read the part shown again (its tone name, octave and the sliders’ values).

poll_now() → None[source]

The part shown changed: read it straight away.

request_part(part) → None[source]
on_outgoing(message) → None[source]

A value, note or program sent from the app: wait before reading.

on_incoming(message) → None[source]
on_dt1(address: tuple, values: list) → None[source]
_system_read(address, values) → None[source]
follow_part(channel) → None[source]

The JD-Xi plays its keyboard on the channel of the part selected on it: the window selects that part too, so its tone buttons, octave and sliders act on the part being played (they acted on the part selected in the app, and a tone chosen there was not heard until the two were aligned).

Only after a few notes in a row on that channel, and not more than once in a while: a pattern playing several parts does not make it jump.

_octave_read(part, store: Dict, octave: int) → None[source]
_show_part_octave() → None[source]
_show_octave(octave: int) → None[source]
_show_sliders(part, address, values, block, offsets) → None[source]
_new_program() → None[source]

A program loads as saved: the ENV slider (relative to it) back to the middle.

knob_moved(channel: int, control: int, value: int) → None[source]

A knob turned on the JD-Xi (CC or NRPN): the window’s slider follows it at once; the editors get the value with the next reading.

_show_knob(name: str, value: int) → None[source]
light_key(note: int, on: bool, channel: int | None = None) → None[source]

Light the window’s key under the finger: with an octave shift the JD-Xi sends its keys an octave or more away, and the window’s keyboard (always the 37 keys of the JD-Xi) shows the key that was pressed. A key lit stays the one turned off, also if the octave changes while it is held.

show_wheel(name: str, value: float) → None[source]

The window’s pitch or mod wheel shows where the JD-Xi’s is.

part_octave(channel: int | None) → int[source]

Octave shift of the part playing on channel (that of the part shown when the channel is not a part’s).

eventFilter(watched, event) → bool[source]
static _bytes(message)[source]