Why is the detected BPM sometimes half or double what I expected?
It is octave ambiguity: strong off-beat hits can generate a double-time candidate that scores higher on raw salience than the real tempo. In a test with a 90 BPM track, the 181.8 BPM candidate scored higher (0.947 versus 0.931), yet the tool still chose 89.5 as the primary answer, keeping 181.8 as the alternate.
What frequency range does the algorithm listen to for the beat?
Three bands at different weights: 20 to 180Hz (weight 1.3, bass and kick), 180 to 4200Hz (weight 1.0, snare and vocals), and 4200 to 11000Hz (weight 0.65, hi-hats and cymbals). Summing all three instead of just one avoids missing the beat in songs where the bass is weak but the treble is strongly marked.
What does a confidence score below 50% actually mean?
It means a second BPM candidate scores nearly as strongly as the chosen one, usually an octave above or below. It does not mean the BPM is wrong: on an ambiguous 90 BPM track confidence landed at 47%, even with a correct final value, because the 181.8 BPM candidate had a close salience score.