jdxi_editor.ui.preset.model =========================== .. py:module:: jdxi_editor.ui.preset.model .. autoapi-nested-parse:: Preset domain model: named sounds with MIDI wire addresses. Catalog dictionaries are converted to Preset at the load_presets boundary; callers work with immutable Preset / ProgramChangeSelection objects only. Attributes ---------- .. autoapisummary:: jdxi_editor.ui.preset.model.PRESET_SOURCES Classes ------- .. autoapisummary:: jdxi_editor.ui.preset.model.Preset jdxi_editor.ui.preset.model.ProgramChangeSelection Functions --------- .. autoapisummary:: jdxi_editor.ui.preset.model.load_presets Module Contents --------------- .. py:data:: PRESET_SOURCES :type: Dict[jdxi_editor.ui.preset.source.PresetSource, Callable[[], object]] .. py:class:: Preset A synthesizer preset and its MIDI wire address. .. py:attribute:: name :type: str .. py:attribute:: bank :type: jdxi_editor.midi.bank.Bank .. py:attribute:: program :type: int .. py:attribute:: category :type: str :value: '' .. py:attribute:: source :type: Optional[jdxi_editor.ui.preset.source.PresetSource] :value: None .. py:attribute:: id :type: str :value: '' .. py:attribute:: preset_number :type: Optional[int] :value: None .. py:method:: __post_init__() -> None .. py:property:: midi_address :type: tuple[int, int, int] Return (bank MSB, bank LSB, program) as wire values. .. py:class:: ProgramChangeSelection A preset selected for transmission on a MIDI channel. .. py:attribute:: channel :type: int .. py:attribute:: preset :type: Preset .. py:method:: __post_init__() -> None .. py:property:: bank :type: jdxi_editor.midi.bank.Bank .. py:property:: program :type: int .. py:property:: name :type: str .. py:function:: load_presets(source: jdxi_editor.ui.preset.source.PresetSource) -> List[Preset] Convert catalog PROGRAM_CHANGE data for ``source`` into wire-address Presets. Dictionaries do not leave this boundary.