improved tempo extraction (DEBUG)