Chakra: add key variable, picker shows (multi) for multi-key tracks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 13:01:49 -04:00
parent 5538951629
commit d656a7392b
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -404,7 +404,13 @@ def pick_track():
m = int(duration_sec // 60)
s = int(duration_sec % 60)
pitch = score.reference_pitch if score.reference_pitch != 440.0 else None
track_key = str(getattr(mod, 'key', '')) if hasattr(mod, 'key') else ""
# Detect multi-key tracks
if hasattr(mod, 'key_lower'):
track_key = "(multi)"
elif hasattr(mod, 'key'):
track_key = str(mod.key)
else:
track_key = ""
tuning = ""
if score.system != "western":
tuning = score.system
+1
View File
@@ -31,6 +31,7 @@ score = Score("4/4", bpm=60, system="shruti", reference_pitch=432.0)
# Throat/Third Eye: E major (bright, expressive)
# Crown: dissolves into pure frequency
key = Key("G", "major") # primary key (multi-key track)
key_lower = Key("G", "major") # root, sacral
key_middle = Key("C", "major") # solar, heart
key_upper = Key("E", "major") # throat, third eye