jdxi_editor.ui.editors.midi_player.fit_jdxi
Fit to the JD-Xi: what of a MIDI file the JD-Xi plays, and a proposal that puts its tracks on the JD-Xi’s four parts.
The JD-Xi plays four parts, each on its own channel: Digital 1 (1), Digital 2 (2), Analog (3), Drums (10). Notes on any other channel are not heard. A file made for the JD-Xi has nothing to fit; a general file (an orchestra on 16 channels) does.
Attributes
Classes
One row per track with notes: where it is, and the part proposed for it; |
Functions
|
The JD-Xi presets a part can take: Digital tones (1, 2), Analog tones (3), drum kits (10). |
|
(bank MSB, bank LSB, program 0-127) to send for preset. |
|
«Digital 1», …; a channel the JD-Xi does not play: «channel 5». |
|
The tracks that play notes (tempo and marker tracks have nothing to fit). |
|
One line on what the JD-Xi plays of midi_file, and whether it is ready |
|
Track index -> proposed 1-based channel (NOT_PLAYED: leave it off). |
|
Track index -> the part it is on now (1-based channel; NOT_PLAYED: on no part). |
Module Contents
- jdxi_editor.ui.editors.midi_player.fit_jdxi.part_presets(channel: int) list[dict][source]
The JD-Xi presets a part can take: Digital tones (1, 2), Analog tones (3), drum kits (10).
- jdxi_editor.ui.editors.midi_player.fit_jdxi.preset_wire(preset: dict) tuple[int, int, int][source]
(bank MSB, bank LSB, program 0-127) to send for preset.
- jdxi_editor.ui.editors.midi_player.fit_jdxi.part_name(channel: int) str[source]
«Digital 1», …; a channel the JD-Xi does not play: «channel 5».
- jdxi_editor.ui.editors.midi_player.fit_jdxi.note_tracks(midi_file: mido.MidiFile) list[TrackInfo][source]
The tracks that play notes (tempo and marker tracks have nothing to fit).
- jdxi_editor.ui.editors.midi_player.fit_jdxi.summary(midi_file: mido.MidiFile | None) tuple[str, bool][source]
One line on what the JD-Xi plays of midi_file, and whether it is ready (every track that plays notes is on a JD-Xi part).
- jdxi_editor.ui.editors.midi_player.fit_jdxi.propose(tracks: list[TrackInfo], drum_indices: list[int], classifications: dict) dict[int, int][source]
Track index -> proposed 1-based channel (NOT_PLAYED: leave it off).
The drum tracks to Drums (10). Each melodic part takes ONE track, the one recognised best for it: the bass to Digital 1, keys or guitars to Digital 2, strings to Analog (the Analog part plays one note at a time; many tracks on one part would only be a jumble). Every other track is not played. A part nothing was recognised for keeps the track already on its channel, if any.
- jdxi_editor.ui.editors.midi_player.fit_jdxi.current(tracks: list[TrackInfo]) dict[int, int][source]
Track index -> the part it is on now (1-based channel; NOT_PLAYED: on no part).
- class jdxi_editor.ui.editors.midi_player.fit_jdxi.FitDialog(tracks: list[TrackInfo], proposal: dict[int, int], parent: PySide6.QtWidgets.QWidget | None = None, start_as_now: bool = False, midi_file: mido.MidiFile | None = None)[source]
Bases:
PySide6.QtWidgets.QDialogOne row per track with notes: where it is, and the part proposed for it; under the table, the sound of each part (with a file: the JD-Xi preset closest to the General MIDI instrument of the part’s main track).
- CHOICES = [(1, 'Digital 1 (channel 1)'), (2, 'Digital 2 (channel 2)'), (3, 'Analog (channel 3)'), (10,...[source]
- select(parts: dict[int, int]) None[source]
Choose parts (track index -> 1-based channel or NOT_PLAYED) in the Part column.
- static _colour(combo: PySide6.QtWidgets.QComboBox) None[source]
The part’s colour; grey when not played.
- main_track(channel: int) TrackInfo | None[source]
The track with the most notes among those chosen for the part on channel.
- _propose_sounds() None[source]
Each part’s sound from its main track’s GM instrument (not the ones chosen by hand).