mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Implemented key setting into adapters
This commit is contained in:
1 parent
b5b3dd04c3
commit
c3571fd054
23 files changed
+656
-101
No files matched your search
@@ -90,6 +90,7 @@ with tempfile.TemporaryDirectory() as d:
|
||||
check("no cue colours to pick", caps.cues.color == "none" and caps.cues.palette == [])
|
||||
check("flexible beatgrids supported", caps.grid.flexible is True)
|
||||
check("grid is lockable", caps.grid.lockable is True)
|
||||
check("the key can be written", caps.tracks.key_writable is True)
|
||||
check("save facts present for the UI to compose copy from",
|
||||
caps.save.app_name == "Traktor" and caps.save.overwrite_risk == "on_exit")
|
||||
|
||||
@@ -106,6 +107,14 @@ with tempfile.TemporaryDirectory() as d:
|
||||
check("metadata edit is visible in the projection",
|
||||
adapter.track(tid).genre == "Konduktor Test Genre")
|
||||
|
||||
# key — the projection's wheel, mode AND display text all follow
|
||||
t = adapter.set_key(tid, 4, "minor") # 4A = F minor = Open Key 9m
|
||||
check("set_key returns the refreshed track",
|
||||
t is not None and (t.key, t.key_wheel, t.key_mode) == ("9m", 4, "minor"),
|
||||
f"{t and (t.key, t.key_wheel, t.key_mode)}")
|
||||
check("…and the index holds it (the key filter finds it)",
|
||||
any(x.id == tid for x in adapter.query_tracks(key="9m", limit=20000).items))
|
||||
|
||||
# cues — a free slot on a track with a grid, so the companion guard is clear
|
||||
tid2 = next(
|
||||
t.id for t in adapter.tracks
|
||||
|
||||
Reference in new issue
Block a user