openmixer — generated API reference
    Preparing search index...

    Function makeBandId

    • A fresh band id: the LOWEST number not already used in existing — deterministic, so add/remove keeps stable, collision-free ids without a shared counter or a clock read.

      The id is a bare number and it is NOT the band's position: /eq/bands/ already names the collection, so a band- prefix would only repeat it. Minting is 1-BASED deliberately — no band ever holds "0", so a caller still addressing the first band by its position is answered no-such-instance on its first call rather than silently moving the band above the one it meant.

      FILLING THE GAP IS THE POINT (operator, 2026-08-13): "if he removes 5, we must not renumber. But if he adds another one, we can reuse the 5 without a problem." Removing band 5 of six leaves 1,2,3,4,6 — the survivors keep the numbers the operator is looking at — and the next add takes the freed 5 rather than climbing to 7. What must never change is a number already on screen; a number nobody holds is free to be handed out again, and reusing it keeps the set an operator reads at a glance small and dense instead of drifting upward all show.

      Parameters

      Returns string