jdxi_editor.ui.editors.drum.partial.pitch_env

This module defines the DrumPitchEnvSection class, which provides a PySide6-based user interface for editing drum pitch envelope parameters in the Roland JD-Xi synthesizer. It extends the QWidget base class and integrates MIDI communication for real-time parameter adjustments and preset management.

Key Features:

  • Provides a graphical editor for modifying drum pitch envelope parameters, including pitch env depth, pitch env velocity sens, pitch env time1 velocity sens, pitch env time4 velocity sens, pitch env time1, pitch env time2, pitch env time3, pitch env time4, pitch env level0, pitch env level1, pitch env level2, pitch env level3, and pitch env level4.

  • Includes a visual envelope plot showing the 5-level, 4-time-segment envelope curve.

Dependencies:

  • PySide6 (for UI components and event handling)

  • MIDIHelper (for handling MIDI communication)

  • PresetHandler (for managing synth presets)

  • Various custom enums and helper classes (AnalogParameter, AnalogCommonParameter, etc.)

Usage:

The DrumPitchEnvSection class can be instantiated as part of a larger PySide6 application. It requires a MIDIHelper instance for proper communication with the synthesizer.

Example:

midi_helper = MIDIHelper() editor = DrumPitchEnvSection(midi_helper) editor.show()

Classes

DrumPitchEnvPlot

Plot widget for drum pitch envelope visualization.

DrumPitchEnvSection

Drum Pitch Env Section for the JDXI Editor

Functions

midi_to_pitch_level(→ float)

Convert MIDI value (1-127, representing -63 to +63) to pitch level (-63.0 to +63.0).

midi_to_time_normalized(→ float)

Convert MIDI value (0-127) to normalized time (0.0 to max_time seconds).

Module Contents

jdxi_editor.ui.editors.drum.partial.pitch_env.midi_to_pitch_level(midi_value: int) float[source]

Convert MIDI value (1-127, representing -63 to +63) to pitch level (-63.0 to +63.0).

jdxi_editor.ui.editors.drum.partial.pitch_env.midi_to_time_normalized(midi_value: int, max_time: float = 10.0) float[source]

Convert MIDI value (0-127) to normalized time (0.0 to max_time seconds).

class jdxi_editor.ui.editors.drum.partial.pitch_env.DrumPitchEnvPlot(width: int = JDXiStyle.ADSR_PLOT_WIDTH, height: int = JDXiStyle.ADSR_PLOT_HEIGHT, envelope: dict = None, parent: PySide6.QtWidgets.QWidget = None)[source]

Bases: PySide6.QtWidgets.QWidget

Plot widget for drum pitch envelope visualization.

enabled = True[source]
envelope[source]
sample_rate = 256[source]
setEnabled(enabled)[source]
set_values(envelope: dict) None[source]

Update envelope values and refresh plot.

paintEvent(event)[source]

Paint the pitch envelope plot

class jdxi_editor.ui.editors.drum.partial.pitch_env.DrumPitchEnvSection(controls: dict[jdxi_editor.midi.data.parameter.drum.partial.DrumPartialParam, PySide6.QtWidgets.QWidget], create_parameter_combo_box: Callable, create_parameter_slider: Callable, midi_helper: jdxi_editor.midi.io.helper.MidiIOHelper)[source]

Bases: PySide6.QtWidgets.QWidget

Drum Pitch Env Section for the JDXI Editor

envelope_changed[source]
controls[source]
_create_parameter_slider[source]
_create_parameter_combo_box[source]
midi_helper[source]
envelope[source]
setup_ui() None[source]

setup UI

_update_envelope(key: str, value: int, param: jdxi_editor.midi.data.parameter.drum.partial.DrumPartialParam = None) None[source]

Update envelope value and refresh plot

Parameters:
  • key – str Envelope parameter key

  • value – int Display value from slider

  • param – AddressParameterDrumPartial Parameter object for conversion