jdxi_editor.ui.editors.base.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 (Analog.Parameter, 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
Base Synth Editor UI. |
Module Contents
- class jdxi_editor.ui.editors.base.editor.BaseSynthEditor(midi_helper: jdxi_editor.midi.io.helper.MidiIOHelper | None = None, preset_helper: jdxi_editor.ui.preset.helper.JDXiPresetHelper | None = None, parent: PySide6.QtWidgets.QWidget | None = None)[source]
Bases:
jdxi_editor.ui.editors.synth.editor.SynthEditorBase Synth Editor UI.
- amp_section: jdxi_editor.ui.editors.analog.amp.section.AnalogAmpSection | None = None[source]
- oscillator_section: jdxi_editor.ui.editors.analog.oscillator.section.AnalogOscillatorSection | None = None[source]
- filter_section: jdxi_editor.ui.editors.analog.filter.section.AnalogFilterSection | None = None[source]
- update_filter_controls_state(mode: int)[source]
Update filter controls enabled state (delegate to section, same mechanism as Digital).
- _on_filter_mode_changed(mode: int)[source]
Handle filter mode changes (callback from filter section when mode button clicked).
- update_filter_state(value: int)[source]
Update the filter state
- Parameters:
value – int value
- Returns:
None
- _update_filter_mode_buttons(partial_number: int, value: int)[source]
Update the filter mode buttons based on the FILTER_MODE_SWITCH value with visual feedback.
Uses Filter.Mode (not Filter.FilterType) so the lookup key matches the section’s button_widgets keys, which are keyed by the spec.param from generate_wave_shapes (Mode). :param value: int filter mode value (0 = BYPASS, 1 = LPF for Analog) :return: None
- _on_waveform_selected(waveform: jdxi_editor.midi.data.analog.oscillator.AnalogWaveOsc)[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 and filter mode 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
- _handle_sliders(param: picomidi.sysex.parameter.address.AddressParameter, value: int, successes: list, failures: list)[source]
Handle sliders
- update_slider(param: picomidi.sysex.parameter.address.AddressParameter, 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.address.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.address.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.address.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_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
- _process_param_update(param_value, param_name, failures: list, successes: list)[source]
Process updates for a single parameter.
- Parameters:
param_name – The name of the parameter
param_value – The value of the parameter
successes – The list of successes to append to
failures – The list of failures to append to
- _log_and_store_sysex_data(sysex_data: dict) None[source]
Compare new and old SysEx data, log differences, and store the current data.
- _get_adsr_params() list[source]
Retrieve the list of ADSR-related parameters.
- Returns:
A list of ADSR parameters
- _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.AnalogWaveOsc)[source]
Enable/disable PW controls based on waveform
- Parameters:
waveform – AnalogOscWave value
- Returns:
None
- _handle_adsr(param: picomidi.sysex.parameter.address.AddressParameter, param_value: int, successes: list, failures: list) bool[source]
Dispatch ADSR parameter updates to the ADSR widget.
- _handle_pitch_env(param, param_value, successes: list, failures: list) bool[source]
Dispatch pitch envelope parameter updates to the pitch env widget.
- _handle_waveform(param, param_value, successes, failures)[source]
Handle waveform; signature matches param_handlers (param, param_value, successes, failures).
- _handle_lfo_shape(param, param_value, successes, failures)[source]
Handler for LFO shape; signature matches param_handlers (param, param_value, successes, failures).
- _handle_filter_mode_switch(param: picomidi.sysex.parameter.address.AddressParameter, param_value: int, successes: list, failures: list)[source]
handle filter mode switch
- _handle_lfo_tempo_sync_switch(param_name: Literal['LFO_TEMPO_SYNC_SWITCH'], param_value, successes: list, failures: list)[source]
Handle LFO Tempo Sync Switch
- _handle_suboscillator(param_name: str, param_value, successes: list, failures: list)[source]
Handle SubOscillator