diff --git a/play.py b/play.py index 33d7e1b..a0e6b2a 100644 --- a/play.py +++ b/play.py @@ -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 diff --git a/tracks/chakra.py b/tracks/chakra.py index ce64773..244fa06 100644 --- a/tracks/chakra.py +++ b/tracks/chakra.py @@ -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