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

Nov 14, 2011 at 12:34pm

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

Hello,
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.
Eliott.

#60003
Nov 14, 2011 at 3:17pm

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: http://cycling74.com/forums/topic.php?id=22543

Cheers
aa

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

#216032
Nov 14, 2011 at 4:01pm

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

eliott

#216033

You must be logged in to reply to this topic.