made a function for working out the time between oscillations of notes
Really messy code but I was in a hurry...