jdxi_editor.midi.track.stats

Track classification utilities for MIDI files.

This module provides functions to classify MIDI tracks into categories: - Bass: Low-pitched, monophonic or low polyphony tracks - Keys/Guitars: Wide range, polyphonic tracks (piano, guitar, etc.) - Strings: Sustained, legato tracks with ensemble-like patterns

Classes

TrackStats

Track Stats

Module Contents

class jdxi_editor.midi.track.stats.TrackStats[source]

Track Stats

track_index: int[source]
track_name: str | None = None[source]
channels: set[int][source]
note_count: int = 0[source]
notes: list[int] = [][source]
velocities: list[int] = [][source]
lowest_note: int = 127[source]
highest_note: int = 0[source]
bass_note_count: int = 0[source]
mid_range_note_count: int = 0[source]
high_note_count: int = 0[source]
note_ons: list[tuple[int, int, int]] = [][source]
note_offs: list[tuple[int, int]] = [][source]
has_pitch_bend: bool = False[source]
has_control_change: bool = False[source]
program_changes: list[int] = [][source]
avg_note_duration: float = 0.0[source]
max_simultaneous: int = 0[source]
note_range: int = 0[source]
legato_score: float = 0.0[source]
scores: dict[str, float][source]