The re-entry problem, and the constant that broke every slow tune
Following a steady groove is the easy half. The half that actually keeps me up is the opposite of playing.
A whole bar of nothing. A breakdown, a hole, the drummer lays out completely, counts it in their head and comes crashing back in on the one. Every drummer does this and it is one of the most musical things you can do. It is also the hardest thing to ask a following band to survive, because for a full bar the thing it follows is not there.
I know exactly how hard, because this is what the bug report said.
The naive build treats hits as the only source of truth. Each hit nudges the tempo, each hit moves the music forward, and the band is a very attentive echo. Lovely, right up until the hits go away, at which point it has nothing to echo and it either freezes or starts guessing.
But a rest is not a stop. A bar of silence is still a bar. The clock is still running, the phrase is still turning over, the downbeat is still coming, and the drummer knows precisely where they are the whole time because they are counting. They just are not hitting anything. So the machine cannot read silence as the song ending. It has to read silence as time still passing at the tempo everyone already agreed on.
Which means the gap is the moment to be least reactive, not most. Hold the last agreed tempo, keep counting through the hole, and do not let one stray hit or a bit of bleed talk you into thinking the tempo just changed.
The baseline is plain. Keep the internal clock ticking at the last tempo the drummer gave you, straight through the rest, and trust them to land where it predicts. That is what a bass player does. Nobody keeps time for the drummer through a breakdown. You hold the pulse in your own head and everyone arrives together on the one.
For a clock box that is the whole answer, because nobody hears a clock. A band has a harder job. It is making actual notes and it has to decide what those notes do while the drummer is out. Keep the bassline walking. Let the pad ring. Drop everyone and leave the hole empty. Get it wrong and the band either tramples the drummer's silence or leaves a dead spot where the tension was supposed to be.
My rule is that the band gets quieter and simpler through a layout, never busier. The drummer stopping is a gesture and the accompaniment should read it as one. Thin out, let something sustain, hold the harmony and leave room. The silence belongs to the drummer. The band's job is to not fill it up out of nervousness.
Then the actual hard moment. The drummer comes back. What do those first hits mean?
Treat re-entry as a cold start, first hit after a silence so let us detect the tempo from scratch, and you get a lurch. The band spends a beat or two re-acquiring, and the return, which should be the most locked-in moment in the whole song, is the one place it sounds unsure. That is backwards. The return should be the tightest thing in the tune, because the drummer has been holding the tempo in their head the entire time and is dead certain where the one is.
So through the gap I keep the phrase position and the last tempo alive rather than parked. When the hits come back I am not asking what tempo this is from zero. I already have a strong prediction and the first hits either confirm it or nudge it. If the drummer comes back a hair early, the band moves to them instead of arguing, because it was expecting them right about there anyway.
Everything above was true for about four seconds. Then this happened.
After four seconds of nothing the lock dropped and everything was wiped. Not parked, wiped. The tempo histogram, the onsets, the accents, the peak history, the kick pattern. The next hit arrived at a cold machine and the graceful re-entry I just spent three sections describing did not happen at all.
Four seconds sounds generous until you do the arithmetic. A bar of 4/4 at 120bpm is two seconds, so a bar of rest is comfortable. At 90 it is about two and a half. But at 60bpm a bar is four seconds exactly. A slow ballad with a bar of rest in it sat precisely on the threshold, and below 60 the drummer lost the band by doing the single most reasonable thing available to them in a slow tune.
I only noticed because I went looking for something to be honest about in this post. The bug had been sitting there for months, in a constant, in a file I had read a hundred times.
The unit that matters is bars, not seconds. That much was obvious. So multiply the timeout by the bar length and go home.
Except that the bar I have is not the bar the drummer has. Play a rock beat at 60bpm with eighths on the hat and the hats are the loudest, most regular thing in the room, so the tracker locks to them. It reports 120. It is not wrong, exactly, it is just an octave above what the drummer thinks they are playing, and it means my bar is two seconds while their bar is four.
So two bars of my clock is one bar of theirs, and my clever new timeout landed on exactly the same boundary as the constant it replaced. I had rewritten the bug in a nicer font.
Three bars is the answer. It sounds arbitrary and it is not. One of their bars can be two of mine, so a rest has to survive two of mine with room left over. At 55bpm the fuse goes from four seconds to six and a half, against a bar that is four and a third seconds long. At 60 it goes from four to six against a bar of four. Everything from 75bpm upward was never broken and is not touched.
It costs something, and I want to be straight about what. A longer fuse means the band keeps playing for longer after you have genuinely stopped. It is bounded, three seconds at the fast end and ten at the slow, but a slow tune now has a noticeably longer tail on it. I think that is the right way round, because a band that will not quite stop is a smaller sin than a band that abandons you in a rest, but I have not lived with it yet.
One more thing fell out of it. An existing test rested for five seconds and asserted that the lock dropped. It passed for a year. It was not testing a behaviour, it was testing the constant, and the moment the constant became a calculation the test was simply wrong. It now asks the tracker how long the fuse is instead of assuming.
The thread through all of this is restraint. The temptation is always to make the machine cleverer, detect the layout, model the breakdown, predict the re-entry with some fancier scheme. But the drummer is not confused during the rest. They know the tune, they are counting, and the most musical thing the machine can do is assume the same competence a bass player would.
Almost everything that has gone wrong in this part of the app came from the band trying to be smart in the gap. Reacting to nothing. Filling the silence. Re-detecting a tempo it already knew. Every fix has had the same shape, which is do less, trust more, stay ready.
And the one that got away from me for months was the opposite mistake. Not the band being too clever, just the band not being patient enough, because somebody wrote four seconds where a calculation should have gone and then never played a slow tune.
Bashery is a generated band that follows your drumming, the tempo, the dynamics, the fills, and the silences too. Try it.
© 2026 Sashyo & Petty Vendetta. All rights reserved. · bashery.app · more posts