Get Amplitude returning -nan(ind) float value

Hey so not sure if you were able to solve this or not. I was having the same issue because I’m layering beats and don’t all start from the begging. By just playing around I was able to figure out that it sort of uses the time from the begging of the track to the end to detect the amplitude or frequencies. So what I did was basically try to replicate my own float counting time.

I grab the duration of the song and depending on if it loops or not I reset it back to 0 and then have it calculate again. Not sure if the math is 100% right for setting the time but it works for me at the moment. Hope this helps!