jdxi_editor.ui.editors.analog.editor

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

Key Features:

  • Provides a graphical editor for modifying analog synth parameters, including oscillator, filter, amp, LFO, and envelope settings.

  • Supports MIDI communication to send and receive real-time parameter changes.

  • Allows selection of different analog synth presets from a dropdown menu.

  • Displays an instrument image that updates based on the selected preset.

  • Includes a scrollable layout for managing a variety of parameter controls.

  • Implements bipolar parameter handling for proper UI representation.

  • Supports waveform selection with custom buttons and icons.

  • Provides a “Send Read Request to Synth” button to retrieve current synth settings.

  • Enables MIDI-triggered updates via incoming program changes and parameter adjustments.

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 AnalogSynthEditor 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() preset_helper = PresetHandler() editor = AnalogSynthEditor(midi_helper, preset_helper) editor.show()

Classes

AnalogSynthEditor

Analog Synth Editor UI.

Module Contents

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

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

Analog Synth Editor UI.

instrument_image_group: PySide6.QtWidgets.QGroupBox | None = None[source]
scroll: PySide6.QtWidgets.QScrollArea | None = None[source]
instrument_preset_group: PySide6.QtWidgets.QGroupBox | None = None[source]
instrument_preset_layout: PySide6.QtWidgets.QVBoxLayout | None = None[source]
instrument_preset: PySide6.QtWidgets.QWidget | None = None[source]
instrument_preset_widget: PySide6.QtWidgets.QWidget | None = None[source]
instrument_preset_hlayout: PySide6.QtWidgets.QHBoxLayout | None = None[source]
amp_section: jdxi_editor.ui.editors.analog.amp.AnalogAmpSection | None = None[source]
oscillator_section: jdxi_editor.ui.editors.analog.oscillator.AnalogOscillatorSection | None = None[source]
filter_section: jdxi_editor.ui.editors.analog.filter.AnalogFilterSection | None = None[source]
read_request_button = None[source]
tab_widget = None[source]
lfo_section = None[source]
instrument_selection_label = None[source]
instrument_title_label = None[source]
preset_helper = None[source]
wave_buttons[source]
lfo_shape_buttons[source]
controls: Dict[jdxi_editor.midi.data.parameter.analog.AnalogParam, PySide6.QtWidgets.QWidget][source]
updating_from_spinbox = False[source]
previous_json_data = None[source]
main_window = None[source]
adsr_mapping[source]
pitch_env_mapping[source]
pwm_mapping = [][source]
refresh_shortcut[source]
sub_osc_type_map[source]
filter_switch_map[source]
osc_waveform_map[source]
setup_ui()[source]

Set up the Analog Synth Editor UI.

setup_main_layout()[source]

set up main layout

_create_sections()[source]

Create the sections for the Analog Synth Editor.

_init_parameter_mappings()[source]

Initialize MIDI parameter mappings.

update_filter_controls_state(mode: int)[source]

Update filter controls enabled state based on mode

_on_filter_mode_changed(mode: int)[source]

Handle filter mode changes

update_filter_state(value: int)[source]

Update the filter state

Parameters:

value – int value

Returns:

None

_on_waveform_selected(waveform: jdxi_editor.midi.data.analog.oscillator.AnalogOscWave)[source]

Handle waveform button selection

Parameters:

waveform – AnalogOscWave value

Returns:

None

get_controls_as_dict()[source]

Get the current values of self.controls as a dictionary. Override to handle waveform buttons specially.

Returns:

dict A dictionary of control parameter names and their values.

_on_lfo_shape_changed(value: int)[source]

Handle LFO shape change

Parameters:

value – int value

Returns:

None

update_slider(param: jdxi_editor.midi.data.parameter.analog.AnalogParam, midi_value: int, successes: list = None, failures: list = None) None[source]

Helper function to update sliders safely.

Parameters:
  • param – AddressParameterAnalog value

  • failures – list of failed parameters

  • successes – list of successful parameters

  • midi_value – int value

Returns:

None

update_adsr_widget(param: jdxi_editor.midi.data.parameter.analog.AnalogParam, midi_value: int, successes: list = None, failures: list = None) None[source]

Helper function to update ADSR widgets.

Parameters:
  • param – AddressParameterAnalog value

  • midi_value – int value

  • failures – list of failed parameters

  • successes – list of successful parameters

Returns:

None

update_pitch_env_widget(parameter: jdxi_editor.midi.data.parameter.analog.AnalogParam, value: int, successes: list = None, failures: list = None) None[source]

Helper function to update ADSR widgets.

Parameters:
  • parameter – AddressParameterAnalog value

  • value – int value

  • failures – list of failed parameters

  • successes – list of successful parameters

Returns:

None

update_pwm_widget(parameter: jdxi_editor.midi.data.parameter.analog.AnalogParam, value: int, successes: list = None, failures: list = None) None[source]

Helper function to update PWM widgets.

Parameters:
  • parameter – AddressParameterAnalog value

  • value – int value

  • failures – list of failed parameters

  • successes – list of successful parameters

Returns:

None

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

Update sliders and combo boxes based on parsed SysEx data.

Parameters:
  • sysex_data – dict SysEx data

  • successes – list SysEx data

  • failures – list SysEx data

Returns:

None

_update_waveform_buttons(value: int)[source]

Update the waveform buttons based on the OSC_WAVE value with visual feedback.

Parameters:

value – int value

Returns:

None

_update_lfo_shape_buttons(value: int)[source]

Update the LFO shape buttons with visual feedback.

Parameters:

value – int value

Returns:

None

_update_pw_controls_state(waveform: jdxi_editor.midi.data.analog.oscillator.AnalogOscWave)[source]

Enable/disable PW controls based on waveform

Parameters:

waveform – AnalogOscWave value

Returns:

None

create_instrument_preset_group(synth_type: str = 'Analog') PySide6.QtWidgets.QGroupBox[source]

Create the instrument preset group box with tabs for normal and cheat presets.

Parameters:

synth_type – str

Returns:

QGroupBox

_populate_cheat_presets(search_text: str = '')[source]

Populate the cheat preset combo box with Digital Synth presets.

Parameters:

search_text – str Search filter text

_on_cheat_category_changed(index: int)[source]

Handle category selection change for cheat presets.

_load_cheat_preset()[source]

Load a Digital Synth preset on the Analog Synth channel (Cheat Mode).