Unable to export real-time audio reactive visuals

Hi All!

I am creating a music visualizer in Processing 4.0.
However when I try to export using saveFrame function, the audio is playing in real-time but the saving function delays the draw loop considerably which results in frame skipping.

For a twenty second song, I’m only getting only 150-200 frames which when played back result in a 7fps frame rate whereas without the saveFrame, the code plays it at a much higher frame rate.

P.S. The video export library is not compatible with Processing 4.

Please help.

You can try using thread!
If the image is really big, try saving it not as a PNG!
If you save it as a tiff, it’s way faster :smiley: