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
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.SynthEditorAnalog Synth Editor UI.
- 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]
- controls: Dict[jdxi_editor.midi.data.parameter.analog.AnalogParam, PySide6.QtWidgets.QWidget][source]
- 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