No problem, happy to help! Do you want an output similar to this:

You could use a line or rectangle to draw the heights but I just wanted to make it a simple visual. In desired ‘audio blocks’ as the song is progressing an average amplitude is being calculated and then passed to your array of ampHistory. As that ampHistory grows in ‘audio blocks’ new lines segments are being drawn to the canvas?