jdxi_editor.devel.parse_drum_json

Script to load and parse a Drum JSON file from .msz using JD-Xi’s SysExParser.

Usage:

python3 parse_drum_json.py [path_to_msz_file] [json_filename]

Example

python3 parse_drum_json.py tests/ceremony_from_software.msz jdxi_tone_data_19703e00.json

Functions

print_header(msg)

print_msg(msg)

print_error(msg)

print_warning(msg)

print_success(msg)

load_json_from_msz(→ Optional[str])

Load a JSON file from an .msz archive.

parse_drum_json(→ Optional[Dict[str, Any]])

Parse a JSON string using JDXiJsonSysexParser.

main()

Main function to load and parse drum JSON file.

Module Contents

jdxi_editor.devel.parse_drum_json.print_header(msg: str)[source]
jdxi_editor.devel.parse_drum_json.print_msg(msg: str)[source]
jdxi_editor.devel.parse_drum_json.print_error(msg: str)[source]
jdxi_editor.devel.parse_drum_json.print_warning(msg: str)[source]
jdxi_editor.devel.parse_drum_json.print_success(msg: str)[source]
jdxi_editor.devel.parse_drum_json.load_json_from_msz(msz_path: pathlib.Path, json_filename: str) str | None[source]

Load a JSON file from an .msz archive.

Parameters:
  • msz_path – Path to the .msz file

  • json_filename – Name of the JSON file to extract

Returns:

JSON string or None if not found

jdxi_editor.devel.parse_drum_json.parse_drum_json(json_string: str) Dict[str, Any] | None[source]

Parse a JSON string using JDXiJsonSysexParser.

Parameters:

json_string – JSON string to parse

Returns:

Parsed dictionary or None

jdxi_editor.devel.parse_drum_json.main()[source]

Main function to load and parse drum JSON file.