added code to output csv file. about to add beatFinder function and code to assume beats