Amplitude analysis of .wav file and cue points

Hi there!

I’m attempting to create a sampler plugin in JUCE where you can load a .wav file, perform amplitude analysis on the waveform and place cue/trigger points throughout the file based on either low or high amplitude points. I then want MIDI notes to trigger these points. Something akin to the way you slice in Renoise.

I was wondering if anyone has done anything similar or could point me in the right direction? I can’t find anything in the documentation related directly to this.