Audio Spectrum CHOP to TOP
One thing you might play with for needs like this is to consider how you might do this with rendered geometry rather than with Python. Sadly, using python to generate images is pretty slow (for lots of reasons). You can, however, generate a similar type of graph using a CHOP to SOP.
You can also use a vertex displacement technique here and that’s wildly more efficient:
Attached is that variation in case you wanted to take a look at this more closely.
Audio spectrum TOP_SOP_variation.toe (20.8 KB)
One other consideration here - rather than converting your CHOPs to a DAT, you can also access the contents of a single channel as a list with the following:
op("some_CHOP")["some_channel"].vals
In your script, you could skip the process of converting CHOP data to a table, and instead access this directly in your scriptTOP as:
vals = op("null1")[0].vals
for index, value in enumerate(vals):
table[index] = value