added global *bpm* which is average bpm