Forums > Dev

poly~ patch to C code, what's the method?

Nov 14 2011 | 12:34 pm

I’ve made a patch with poly~ and want now to move this patch in C world to make an external,
and i’m wondering what’s the best or powerful method to adopt…
– can i simply create an array for each variable (size of each array depends of the number of poly~ instance) in my object structure,
and do a "for(int i = 0; i < numberOfPoly~Instance; i++)", who deals with those variables, directly inside my Dsp While?
am i in the good or wrong way? (notice that i have 64 instance in my initial poly~ patch).
2nd question :
– How (is it possible) to take advantage of the multi-threading in my C code? what’s the method to implement it?

Thanks for reply.

Nov 14 2011 | 3:17 pm

Hi Elliott.

I’d say that yes, the way to go is a loop inside the perform routine. Then, according to the details of what you’re doing, there might be room for some optimization…

About implementing multithreading, have a look here:


ps: don’t forget to look into the simplethread and threadpool examples coming with the SDK!

Nov 14 2011 | 4:01 pm

Thanks for reply Andrea, I’ll make a try and read with more attention the post you mention about multithreading.


Viewing 3 posts - 1 through 3 (of 3 total)

Forums > Dev