midi.track_viewer
Midi Track Viewer
Classes
MidiTrackViewer |
Module Contents
- class midi.track_viewer.MidiTrackViewer(parent: PySide6.QtWidgets.QWidget = None)[source]
Bases:
PySide6.QtWidgets.QWidgetMidiTrackViewer
- _clear_layout(layout: PySide6.QtWidgets.QLayout)[source]
_clear_layout
- Parameters:
layout
- Returns:
Recursively clear a layout and its children.
- toggle_channel_mute(channel: int, is_muted: bool) None[source]
Toggle mute state for a specific MIDI channel.
- Parameters:
channel – int MIDI channel (1-16)
is_muted – bool is the channel muted?
- Returns:
None
- update_muted_channels(muted_channels: set[int]) None[source]
Called when the global mute state is updated.
- toggle_track_mute(track: int, is_muted: bool) None[source]
Toggle mute state for a specific MIDI track.
- Parameters:
track – int MIDI channel (1-16)
is_muted – bool is the channel muted?
- Returns:
None
- update_muted_tracks(muted_tracks: set[int]) None[source]
Called when the global mute state is updated.
- mute_track(track_index: int) None[source]
Mute a specific track
- Parameters:
track_index – int
- Returns:
None
- delete_track(track_index: int) None[source]
Ask user to confirm and delete a specific MIDI track and its widget.
- Parameters:
track_index – int
- Returns:
None
- change_track_name(track_index: int, new_name: str) None[source]
Change the name of a specific MIDI track.
- Parameters:
track_index – int
new_name – str
- Returns:
None
- change_track_channel(track_index: int, new_channel: int) None[source]
Change the MIDI channel of a specific track.
- Parameters:
track_index – int
new_channel – int
- Returns:
None
- make_apply_slot(track_index: int, spin_box: jdxi_editor.ui.widgets.midi.spin_box.spin_box.MidiSpinBox) callable[source]
Create a slot for applying changes to the track channel.
- Parameters:
track_index – int Track index to modify
spin_box – MidiSpinBox Spin box for selecting the channel
- Returns:
callable function to apply changes
- make_apply_name(track_name: str, text_edit: PySide6.QtWidgets.QLineEdit) callable[source]
Create a slot for applying changes to the track channel.
- Parameters:
track_name – str Track name to modify
text_edit – QLineEdit for selecting the name
- Returns:
callable function to apply changes
- set_midi_file(midi_file: mido.MidiFile) None[source]
Set the MIDI file for the widget and create channel controls.
- Parameters:
midi_file
- Returns:
None