# superset kind .......... project status ........ paused since 2026-06-30 · v2 not public yet checked ....... 2026-10-20 stack ......... python · librosa · essentia · mlx source ........ https://github.com/bmontt/superset page .......... https://brodymontag.com/projects/superset A local tool that analyzes a DJ library and puts tracks in an order by key, tempo and energy. It reads a Rekordbox library, from the database or an XML export. superset puts a DJ set in order. I still choose the tracks. It reads a Rekordbox library, analyzes each track, and proposes an order that follows key and energy. The analysis has three stages. librosa measures tempo, key, a 16-point intensity curve and spectral features. Essentia models add genre, mood, danceability and an embedding. A 4-bit Qwen2.5-3B model on MLX writes mix notes and transition tags from those numbers. It does not hear the audio. A greedy walk over a cost matrix makes the order. The cost weighs tempo, energy, key on the Camelot wheel, mood, spectral match and position in the set. Everything runs on the Mac after a first download of the models. The README reports 4 to 8 minutes for 41 tracks on an M4 Pro. The public repo holds the March 2026 version (v1), which grouped tracks with KMeans and DBSCAN. ## highlights - Three stages: librosa, Essentia and a local LLM on MLX - A greedy order over a cost matrix, with the Camelot wheel for key - Reported: 41 tracks in 4 to 8 min on an M4 Pro (README) - Works offline after the first model download - A FastAPI server and a CLI. The Electron app is not in git yet. - The public repo is v1 (March 2026). v2 is not public yet. ## detail updated 2026-10-20 ### how it works figure 1 · a greedy walk on the Camelot wheel · schematic tracks, real cost terms Tracks sit on the Camelot wheel by key. From the slowest track, a walk compares the cost to each track not yet in the set and takes the cheapest. The energy of the set climbs as tracks join. superset reads a Rekordbox library, from the version 6 or 7 database or an XML export. Each track goes through three stages. librosa measures tempo, key, spectral features and a 16-point intensity curve. Essentia models on a Discogs-EffNet embedding add genre, mood and danceability. In the third stage, a 4-bit Qwen2.5-3B model on MLX reads those numbers as JSON. It writes a position in the set, tags for transitions and notes for the mix. Each stage has its own cache, so a new model runs only the third stage again. The order comes from a cost for each pair of tracks and a greedy walk. figure 2 · from a library to a set A Rekordbox library goes through librosa, then Essentia, then a local Qwen model. A cost matrix and a greedy walk make the order. An optional model pass proposes its own order and compares the two. ```mermaid flowchart TD A[Rekordbox library] --> B[librosa DSP] B --> C[Essentia classifiers] C --> D[Qwen2.5-3B on MLX] D --> E[cost matrix] E --> F[greedy walk] F --> H[setlist] F -.->|optional| G[model order and reconcile] G --> H ``` six cost terms and their default weights superset-v2@f3c76b0 · src/superset/analysis/setlist.py:176-186 · not public ```python class SetlistOptimizer: """Intelligently order tracks for optimal DJ flow.""" DEFAULT_WEIGHTS: dict[str, float] = { "tempo": 0.30, "energy": 0.25, "key": 0.15, "mood": 0.15, "spectral": 0.10, "position": 0.05, } ``` ### decisions decision: Measure key distance on the 24-key Camelot wheel (accepted, 2026-06-30) context: The first key cost used 12 notes and ignored the mode. A minor and A major got the same score. decision: The key cost is the shortest path on the Camelot wheel: the clock distance, plus 1 when the mode changes, divided by 6. cost: An unknown key gets a neutral cost of 0.5. A bad key read does not stop the order, but it does not help it. the key term superset-v2@f3c76b0 · src/superset/analysis/setlist.py:355-375 · not public ```python @staticmethod def _key_cost(key_a: str | None, key_b: str | None) -> float: """Return a [0, 1] transition cost using the 24-node Camelot wheel. Distance is the shortest graph path between the two Camelot positions (clock distance + 1 if mode differs), normalised by 6 (the maximum clock distance). Unrecognised keys fall back to 0.5 (neutral). """ if not key_a or not key_b: return 0.5 pos_a = _CAMELOT_MAP.get(key_a) pos_b = _CAMELOT_MAP.get(key_b) if pos_a is None or pos_b is None: return 0.5 h_a, m_a = pos_a h_b, m_b = pos_b clock = abs(h_a - h_b) clock = min(clock, 12 - clock) mode = 0 if m_a == m_b else 1 dist = clock + mode return min(1.0, dist / 6.0) ``` decision: A greedy walk, not an exact search (accepted, 2026-04-22) context: The best order over all the tracks is a travelling-salesman problem. Its exact search grows too fast for a full library. decision: The walk starts at the lowest tempo, the lowest energy or a seeded random track, by flow type. At each step it takes the cheapest next track. cost: The walk does not look ahead. A cheap early step can force an expensive late step. the walk superset-v2@f3c76b0 · src/superset/analysis/setlist.py:407-415 · not public ```python def _greedy_order(self, start_idx: int, costs: np.ndarray) -> list[int]: ordered = [start_idx] remaining = set(range(len(self.tracks))) - {start_idx} while remaining: current = ordered[-1] next_idx = min(remaining, key=lambda j: costs[current, j]) ordered.append(next_idx) remaining.remove(next_idx) return ordered ``` ### results figure kind value full analysis, 41 tracks, M4 Pro, 24 GB reported 4 to 8 min one track, same machine reported 4 to 12 s method: the v2 README states these figures. It gives no date and no method. · as of 2026-04-22 ### limits limits: - The public repo is v1. The v2 code on this page is not public yet. - The time figures come from one machine, and the README gives no method. - The six weights are hand-set defaults. A request can change them, but no search tuned them. - No test compares the order with an order that a DJ made. ### status and next status: - Done: v2 with three analysis stages and the Camelot key cost (2026-06-30). The Electron app is not in git yet. - Paused since 2026-06-30. - Next: publish v2 in the public repo. ### proof - v1 source, March 2026, at ca98d5b -- end of page · this page as text: https://brodymontag.com/machine/projects/superset · index: https://brodymontag.com/machine · summary: https://brodymontag.com/llms.txt