hi,
I don't know...
you need to test.
toArray probably copies the buffer to an array that you can use later.
for a graph, I think amplitude is better than frequency
you can also try to get the frequency bands and for each the amplitude