jdxi_editor.midi.sysex.patch_values
jdxi_editor.midi.sysex.patch_values Patch sections in raw MIDI values, the form the JD-Xi itself sends.
Saved sections carry VALUE_FORMAT: "midi". A section taken from the
synth’s memory also carries SYSEX, the section as one DT1 message, so it
can be restored byte for byte.
Bundles saved before this were written from the editor controls, in their
display units (ms, 0.0-1.0 fractions, signed ±63, …), but read back as raw
values, so every load and save moved them. display_to_midi converts one of
those values the way the control showed it, and upgrade_legacy_section
converts a whole old section.
Example
>>> from jdxi_editor.midi.data.parameter.digital import DigitalPartialParam as P
>>> display_to_midi(P.AMP_PAN, -35) # signed display value
29
>>> display_to_midi(P.AMP_ENV_ATTACK_TIME, 290.0) # ms (10-1000)
36
>>> display_to_midi(P.AMP_ENV_SUSTAIN_LEVEL, 0.39) # fraction
50
Attributes
Functions
|
Parameter class of the section at a 4-byte address ("19012000"), or None. |
|
|
|
Raw MIDI value of param from the value its editor control shows. |
|
Copy of section with its parameter values converted by display_to_midi. |
|
|
|
A section from an old bundle (display values) in raw MIDI values. |
Module Contents
- jdxi_editor.midi.sysex.patch_values.param_class_for_address(address: str)[source]
Parameter class of the section at a 4-byte address (“19012000”), or None.
- jdxi_editor.midi.sysex.patch_values.display_to_midi(param, value: Any) int[source]
Raw MIDI value of param from the value its editor control shows.
Envelope times are in ms (10-5000 for the pitch envelope, 10-1000 otherwise), sustain levels are 0.0-1.0, everything else is in the parameter’s display range, which the parameter converts itself.