I am learning some python audio processing and was wondering how I could split an audio file into different amplitude time plots when a sound plays. For example if the audio file is a guitar that plays four notes and different times I would like to isolate each note for the duration that it plays between that threshold. For example, note one plays between 1 and 2 seconds and it will snip the plot at 1 and 2 and create a new plot and data set for that plot.
For each section where the threshold for amplitude is high enough it will cut that section and produce something like this: