Created function to scrape pitch info from midi messages, ignoring repeats for noteon/off