jdxi_editor.ui.editors.digital.utils

This module contains utility functions for handling SysEx data related to digital synths.

Functions

filter_sysex_keys(→ dict)

Filter out unwanted keys from the SysEx data.

_get_synth_number(→ int)

Get the synth number based on the synth tone.

get_partial_number(→ int)

Get the partial number based on the synth tone.

_is_valid_sysex_area(→ bool)

Check if the SysEx data is from a valid digital synth area.

log_synth_area_info(→ None)

Log information about the SysEx area.

_is_digital_synth_area(→ bool)

Check if the area code corresponds to a digital synth area.

_sysex_area_matches(→ bool)

Check if the SysEx data matches the expected area.

_sysex_area2_matches(→ bool)

Check if the SysEx data matches the expected area.

_sysex_tone_matches(→ bool)

Check if the SysEx data matches the expected area.

get_area(→ str)

Map address bytes to corresponding temporary area.

to_hex(→ str)

Convert a value to a hex string.

Module Contents

jdxi_editor.ui.editors.digital.utils.filter_sysex_keys(sysex_data: dict) dict[source]

Filter out unwanted keys from the SysEx data.

Parameters:

sysex_data – dict

Returns:

dict

jdxi_editor.ui.editors.digital.utils._get_synth_number(synth_tone: str) int[source]

Get the synth number based on the synth tone.

Parameters:

synth_tone – str

Returns:

int

jdxi_editor.ui.editors.digital.utils.get_partial_number(synth_tone: str, partial_map: dict = SYNTH_PARTIAL_MAP) int[source]

Get the partial number based on the synth tone.

Parameters:
  • synth_tone – str

  • partial_map – str

Returns:

int

jdxi_editor.ui.editors.digital.utils._is_valid_sysex_area(sysex_data: dict) bool[source]

Check if the SysEx data is from a valid digital synth area.

Parameters:

sysex_data – dict

Returns:

bool

jdxi_editor.ui.editors.digital.utils.log_synth_area_info(sysex_data: dict) None[source]

Log information about the SysEx area.

Parameters:

sysex_data – dict

Returns:

None

jdxi_editor.ui.editors.digital.utils._is_digital_synth_area(area_code: int) bool[source]

Check if the area code corresponds to a digital synth area.

Parameters:

area_code – int

Returns:

bool

jdxi_editor.ui.editors.digital.utils._sysex_area_matches(sysex_data: dict, area: int) bool[source]

Check if the SysEx data matches the expected area.

Parameters:
  • sysex_data – dict

  • area – int

Returns:

bool

jdxi_editor.ui.editors.digital.utils._sysex_area2_matches(sysex_data: dict, area: int) bool[source]

Check if the SysEx data matches the expected area.

Parameters:
  • sysex_data – dict

  • area – int

Returns:

bool

jdxi_editor.ui.editors.digital.utils._sysex_tone_matches(sysex_data: dict, tone: int) bool[source]

Check if the SysEx data matches the expected area.

Parameters:
  • sysex_data – dict

  • tone – int

Returns:

bool

jdxi_editor.ui.editors.digital.utils.get_area(data: list) str[source]

Map address bytes to corresponding temporary area.

Parameters:

data – list[int, int]

Returns:

str

jdxi_editor.ui.editors.digital.utils.to_hex(value: int, width: int = 2) str[source]

Convert a value to a hex string.

Parameters:
  • value – int

  • width – int

Returns:

str