Ask HN: Machine learning resources for audio processing
See this book and the sources it links to: https://musicinformationretrieval.com/ Also google for pitch and onset detection. If you want more specific help, you have to ask a more specific question.