jdxi_editor.ui.widgets.midi.track
Midi Track Widget
Attributes
Classes
MidiTrackWidget |
Functions
|
This skin draws each lane as a punched card, on its own backing. |
|
Fill |
Module Contents
- jdxi_editor.ui.widgets.midi.track.punched_cards() bool[source]
This skin draws each lane as a punched card, on its own backing.
- Returns:
bool
- jdxi_editor.ui.widgets.midi.track.paint_lane_backing(painter, rect) None[source]
Fill
rectwith what the cards lie on: the skin’s own backing (its cabinet wood, or brushed metal on the metal skin).- Parameters:
painter – QPainter
rect – QRect | QRectF the area behind the cards
- Returns:
None
- class jdxi_editor.ui.widgets.midi.track.MidiTrackWidget(track: mido.MidiTrack, track_number: int, total_length: float, ticks_per_beat: int | None = None, parent: jdxi_editor.ui.common.QWidget = None, tick_to_seconds: Callable[[int], float] | None = None)[source]
Bases:
jdxi_editor.ui.common.QWidgetMidiTrackWidget
- set_track(track: mido.MidiTrack, total_length: float, ticks_per_beat: int | None = None) None[source]
set_track
- Parameters:
track – mido.MidiTrack
total_length – float total file length in seconds
ticks_per_beat – MIDI file ticks per beat
- Returns:
None
- update_muted_tracks(muted_tracks: set[int]) None[source]
Called when the global mute state is updated.
- _is_channel_muted(channel: int) bool[source]
channel is 0-15; muted_channels holds 1-16 as the mute buttons show.
- update_muted_channels(muted_channels: set[int]) None[source]
Called when the global mute state is updated.
- set_playhead(norm: float | None) None[source]
Show the playback position as a line.
- Parameters:
norm – Position as a fraction (0..1) of the file length; None hides it
- render_track_to_pixmap() PySide6.QtGui.QPixmap[source]
Draw the lane: a miniature piano roll in the track’s channel colour.
Each note is a bar from its start to its end, placed by pitch; a faint band in the same colour covers the stretch from the first note to the last. Tracks without notes (tempo, markers) are left empty.
- Returns:
QPixmap