Setting @source very quickly?

A bit of an optimization question since I’m getting a gnarly pd patch ready to eventually live on a bela.

Because of the architecture of my abstractions, I end up passing a list made up of <frameToAnalyze bufferName> to fluid.bufmfcc~, which I normally fork the buffer name off through a zl change to not spam the object, out habit/hygiene reasons. In pd there’s no zl change, so I’ve pieced together similar functionality from vanilla abstractions to do the same, but I’m wondering if it’s fine just (re)setting @source on each attack.

I quickly tested something looking at the cpu usage in Activity Monitor and saw nothing bad there, but that’s obviously not very exact or indicative.

So in short, is it bad/poor practice to set @source on every analysis frame, where the source name/buffer itself will be unchanging for the life of that specific instantiation?

Shouldn’t be, no – the cost is actually in doing the analysis. Setting -source should be pretty much invisible by comparison

1 Like