Fixed time calculation code and beat placement