Skip to content

Lull 1.10 — Force Tempo

Choose a tag to compare

@PortableDiag PortableDiag released this 15 Sep 01:50
· 10 commits to main since this release

Set a BPM and every track plays at it. Under Force tempo in the overflow menu: pick a target anywhere from 60 to 200 and each track is sped up as far as it needs to reach it, pitch preserved — a 128 BPM track at 1.09x is still in the key it was recorded in.

It exists for one complaint: a workout playlist where one slow track is a slow patch in the workout. The defaults follow from that.

  • Never slow a track down (on by default) — anything already at or above the target is left completely alone.
  • A ceiling on the stretch (30% by default) — roughly where a stretch stops being unnoticeable. A track that can't reach the target inside the ceiling goes as far as the ceiling allows, not further.

Where a tempo comes from. The file's TBPM tag if it has one; otherwise Lull measures it — half a minute decoded from 30 seconds in, reduced to an onset envelope and autocorrelated. It's remembered per track, and the next track in the queue is analysed while the current one plays, so the only track ever heard at the wrong speed is the one that was already playing when you switched the feature on.

A track with no tempo is never touched. An audiobook or a drone is analysed, found to have no steady beat, and written down as having none. "Nothing known yet" and "nothing there" are two different states — a player that invented a tempo for a podcast and then played it 30% fast would be indefensible.

The measured number is editable, because it's a measurement rather than a preference and you can hear when it's wrong. Type over it in the panel and it sticks; clear it and Lull has another go.

Octaves. A tempo is only defined up to a factor of two, and that's handled twice over: a 70 BPM track counted in double time is 140 and is left alone, while a merely slow 95 BPM track is not excused as a secretly-fast one. The estimator searches lags at quarter-frame resolution because a 160 BPM beat lands every 37.5 envelope frames — a whole-frame search reports 80 for it, confidently.

API. GET/PUT /api/tracks/{id}/bpm; forceTempo, tempoBpm, tempoMaxChange, tempoOnlyFaster on /api/settings; speed and source_bpm on /api/player. GET /api/docs covers all of it.

Tests: 83 → 138. Verified on a device against generated click tracks at known tempos — 100, 128, 160 and a TBPM-tagged 95 all read within 1 BPM, pink noise correctly found to have none — with crossfade and A-B both still correct underneath a forced track.

See CHANGELOG.md for the full entry.