jdxi_editor.ui.editors.drum.editor

This module provides the DrumEditor class, which serves as an editor for JD-Xi Drum Kit parameters. It enables users to modify drum kit settings, select presets, and send MIDI messages to address connected JD-Xi synthesizer.

Classes

  • DrumEditor: A graphical editor for JD-Xi drum kits, supporting preset

selection, parameter adjustments, and MIDI communication.

Dependencies

  • PySide6.QtWidgets for UI components.

  • PySide6.QtCore for Qt core functionality.

  • jdxi_manager.midi.data.parameter.drums.DrumParameter for drum parameter definitions.

  • jdxi_manager.midi.data.presets.data.DRUM_PRESETS_ENUMERATED for enumerated drum presets.

  • jdxi_manager.midi.data.presets.preset_type.PresetType for preset categorization.

  • jdxi_manager.midi.io.MIDIHelper for MIDI communication.

  • jdxi_manager.midi.preset.loader.PresetLoader for loading JD-Xi presets.

  • jdxi_manager.ui.editors.drum_partial.DrumPartialEditor for managing individual drum partials.

  • jdxi_manager.ui.style.Style for UI styling.

  • jdxi_manager.ui.editors.base.SynthEditor as the base class for the editor.

  • jdxi_manager.midi.data.constants.sysex.DIGITAL_SYNTH_1 for SysEx address handling.

  • jdxi_manager.ui.widgets.preset.combo_box.PresetComboBox for preset selection.

Features

  • Displays and edits JD-Xi drum kit parameters.

  • Supports drum kit preset selection and loading.

  • Provides sliders, spin boxes, and combo boxes for adjusting kit parameters.

  • Includes address tabbed interface for managing individual drum partials.

  • Sends MIDI System Exclusive (SysEx) messages to update the JD-Xi in real time.

Usage

To use the DrumEditor, instantiate it with an optional MIDIHelper instance:

from jdxi_editor.midi.io import MIDIHelper
from jdxi_editor.ui.editors.drum_editor import DrumEditor
from PySide6.QtWidgets import QApplication

app = QApplication([])
midi_helper = MIDIHelper()
editor = DrumEditor(midi_helper)
editor.show()
app.exec()

Classes

DrumCommonEditor

Editor for JD-Xi Drum Kit parameters

Module Contents

class jdxi_editor.ui.editors.drum.editor.DrumCommonEditor(midi_helper: jdxi_editor.midi.io.helper.MidiIOHelper | None = None, preset_helper: jdxi_editor.jdxi.preset.helper.JDXiPresetHelper | None = None, parent: PySide6.QtWidgets.QWidget | None = None)[source]

Bases: jdxi_editor.ui.editors.synth.editor.SynthEditor

Editor for JD-Xi Drum Kit parameters

instrument_image_group: PySide6.QtWidgets.QGroupBox | None = None[source]
presets_parts_tab_widget = None[source]
preset_helper = None[source]
midi_helper = None[source]
partial_number = 0[source]
sysex_current_data = None[source]
sysex_previous_data = None[source]
partial_mapping[source]
main_window = None[source]
partial_editors[source]
partial_tab_widget[source]
instrument_image_label = None[source]
instrument_title_label = None[source]
controls: Dict[jdxi_editor.midi.data.parameter.drum.partial.DrumPartialParam | jdxi_editor.midi.data.parameter.drum.common.DrumCommonParam, PySide6.QtWidgets.QWidget][source]
refresh_shortcut[source]
setup_ui() None[source]

Setup the UI components for the drum editor.

_handle_program_change(channel: int, program: int)[source]

Handle program change messages by requesting updated data

Parameters:
  • channel – int

  • program – int

_setup_partial_editors()[source]

Setup the 36 partial editors

update_partial_number(index: int)[source]

Update the current partial number based on tab index

Parameters:

index – int partial number

_update_partial_controls(partial_no: int, sysex_data: dict, successes: list, failures: list) None[source]

apply partial ui updates

Parameters:
  • partial_no – int

  • sysex_data – dict

  • successes – list

  • failures – list

Returns:

_update_common_controls(partial: int, sysex_data: Dict, successes: list = None, failures: list = None)[source]

Update the UI components for tone common and modify parameters.

Parameters:
  • partial – int

  • sysex_data – Dictionary containing SysEx data

  • successes – List of successful parameters

  • failures – List of failed parameters

Returns:

None