Commit 2baef681 by PLN (Algolia)

fix(setbuilder): stop inventing a tempo for a third of the catalog

`declared_bpm` defaults to 120 when a track sets no setcps, which is right for
the driver — the OLED has to breathe at some rate — and wrong for a picker.
221 of the 703 tracks declare no setcps at all, so a third of the cards were
showing a confident 120 that came from nowhere. That is the worst shape a
wrong number can take: plausible, and load-bearing for the arc he is about to
order tonight.

Now the generator passes default=0 and those cards read "inherits bpm", which
is not a gap but the actual behaviour — a track with no setcps runs at whatever
tempo the previous one left behind, and for building a ramp that is worth
knowing. They sort last on the BPM axis, since they have no place on a ramp
until you decide what they inherit.
parent 9f48601e
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -250,7 +250,9 @@ var filt = {q:"", area:"", warn:false, hands:false, warm:false, sort:"hands"};
var SORTS = {
hands: function(a,b){ return (b.n - a.n) || a.p.localeCompare(b.p); },
light: function(a,b){ return (a.b - b.b) || a.p.localeCompare(b.p); },
bpm: function(a,b){ return (a.m - b.m) || a.p.localeCompare(b.p); }
/* tracks that declare no tempo sort last: they have no place on a BPM ramp
until you decide what they inherit. */
bpm: function(a,b){ return ((a.m || 1e4) - (b.m || 1e4)) || a.p.localeCompare(b.p); }
};
function matches(t){
......@@ -308,8 +310,11 @@ function renderLib(){
if(t.b > 0 && t.w < t.b){
top.appendChild(el("span", "pill cold", (t.b - t.w) + " cold of " + t.b));
}
top.appendChild(el("span", "meta", t.m + " bpm · " + t.b + " bank" +
(t.b === 1 ? "" : "s")));
/* 0 means the track sets no setcps and inherits the running tempo. Showing
it as 120 would invent a number for a third of the catalog. */
top.appendChild(el("span", "meta",
(t.m ? t.m + " bpm" : "inherits bpm") + " · " + t.b +
" bank" + (t.b === 1 ? "" : "s")));
if(i >= 0) top.appendChild(el("span", "added", "in set #" + (i+1) + " — tap to remove"));
card.appendChild(top);
if(NOTES[t.p]) card.appendChild(el("div", "note", NOTES[t.p]));
......@@ -497,6 +502,8 @@ document.getElementById("sort").addEventListener("change", function(){
"lazy-load on first hit.",
"bpm — what the track DECLARES via setcps, not a measured tempo: setcps 80 " +
"with everything on the half-note performs at 160.",
"inherits bpm — the track sets no setcps at all (221 of them do not) and " +
"runs at whatever tempo the previous track left behind.",
"banks — distinct sample folders the track pulls from. The closest the " +
"tooling gets to \u2018sample heavy\u2019; sort by it to find the light ones.",
(c.COMPILE_FAIL || 0) + " tracks that do not compile are not listed at all.",
......
......@@ -22,10 +22,12 @@ Signals, and what each one is worth:
played how many times the driver journal saw this track loaded. Journal
retention is short, so this is "seen in the window", not all-time —
but it is the only record of what PLN's hands actually reach for.
bpm what the track DECLARES via setcps. tempo-lens.py opens by warning
that setcps is not the tempo — a track at setcps 80 with everything
on the half-note performs at 160 — so this is a handle for picking an
arc, never a claim about how fast it sounds.
bpm what the track DECLARES via setcps, or 0 for the 221 tracks that
declare nothing and simply inherit the cps already running.
tempo-lens.py opens by warning that setcps is not the tempo — a track
at setcps 80 with everything on the half-note performs at 160 — so
this is a handle for picking an arc, never a claim about how fast it
sounds.
weight the bank count again, read as sample load. PLN, 2026-09-22: "cyber
hump and wap and bombe dj not adequate too sample heavy its a
nujazz/chill dnb set". A count of distinct banks is the honest proxy
......@@ -129,7 +131,11 @@ def main():
banks_warm += 1
stem = Path(rel).stem
area, sub = area_of(rel)
bpm = declared_bpm(src.read_text(errors="replace")) if src.is_file() else 0
# default=0 means "declares none", NOT 120. 221 of the 703 tracks set no
# setcps at all — they inherit whatever cps is already running, which is
# real information for ordering an arc. Printing an invented 120 for a
# third of the catalog would be the worst kind of number: plausible.
bpm = declared_bpm(src.read_text(errors="replace"), default=0) if src.is_file() else 0
rows.append({
"p": rel, # repo-relative path = the identity
"t": stem, # display title
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment