I've been attempting to do some FFT and amplitude analysis on a song, loaded into two arrays (L&R) as quickly as possible. I'm able to do this effectively by creating a playback system that uses phasor~ & tabread4~ to parse through each index of the array in real-time, such as the player in Cheetomoskeeto's tutorial on Youtube, "PURE DATA: 22 Advanced Audio with [tabread4~]"
But what's my best option if I want to parse through each block of audio data from an array as fast as possible? Here's what I have so far, but I don't think I'm on the right track: https://imgur.com/a/aXa4Qan
My attempt uses [Until] to iterate though every index of the L & R channels, in blocks of 512 samples at a time. Since the result of each analyzed block is also stored in an array, the [s dataIndex] value is sent and later used to write the result to the correct index.
My patch doesn't work as expected, and while I'm still investigating why, I'm curious if there's a more straight-forward approach to offline analysis. Thanks for taking the time to read all this, any help is greatly appreciated.