Start of building the Beat tracking algorithm