Source code for jdxi_editor.ui.editors.pattern.models

from dataclasses import dataclass

from jdxi_editor.ui.style.midi_player import PatternEditorStyle


@dataclass
[docs] class NoteButtonAttrs: """Note Button Attributes"""
[docs] NOTE = "note"
[docs] NOTE_DURATION = "note_duration"
[docs] NOTE_VELOCITY = "note_velocity"
@dataclass
[docs] class ButtonAttrs: """Button Attrs"""
[docs] DURATION = "duration"
[docs] CHECKED = "checked"
[docs] NOTE = "note"
[docs] VELOCITY = "velocity"
@dataclass
[docs] class ClipboardData:
[docs] SOURCE_BAR: str = "source_bar"
[docs] START_STEP: str = "start_step"
[docs] END_STEP: str = "end_step"
[docs] NOTES_DATA: str = "notes_data"
[docs] class SequencerStyle: """Row label typography aligned with PatternEditorStyle / UI critique scale."""
[docs] ROW_FONT_SIZE = 12
[docs] ROW_FONT_WEIGHT = "600"
@staticmethod
[docs] def row_label(color: str) -> str: return ( f"font-size: {SequencerStyle.ROW_FONT_SIZE}px;" f"font-weight: {SequencerStyle.ROW_FONT_WEIGHT};" f"color: {color};" )
# Muted part accents (not full JD-Xi neon red)
[docs] DIGITAL = "#B44646"
[docs] DIGITAL_2 = "#C88C3C"
[docs] ANALOG = "#3296A0"
[docs] DRUMS = "#7850A0"
[docs] DEFAULT = PatternEditorStyle.TEXT_SECONDARY