<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>There is another catch with the CPU usage, which I only learned about while building a big libpd app. If you have subpatches within subpatches this is usually not a problem with control data. But, it really helps a lot within a patch if you put all the DSP objects on the same layer (i.e. without and audio subpatches).</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>Of course, the most CPU efficient patch will have no audio subpatches at all. I think the reason is that subpatch audio is calculated in a block within the subpatch, and this means a
separate process from the master patch and takes more CPU time. I'm not 100% sure that's the case, but intuitively it seems to make sense.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>Cheers,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>Ed</span></div><div></div><div> </div><div>Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, for iPhone and iPad<br>http://www.ninjajamm.com/</div><div><br><br></div><div>Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!<br>http://sharktracks.co.uk/ </div><br>
<div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;"> <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Mario Mey <mariomey@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> J Oliver <jaime.oliver2@gmail.com> <br><b><span style="font-weight: bold;">Cc:</span></b> pd-list@iem.at <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, 6 August 2013, 3:15<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [PD] How to reduce CPU use on unused subpatches-abstracts?<br> </font> </div> <div class="y_msg_container"><br>Hi, J. Thanks for the response. Following some suggestion (from you, <br>Maelstorm, Servando Barreiro), I
made some tests. I took the dare to <br>post your mail in the thread... maybe it's better to post there, if <br>anyone has the same problem or just wants to learn.<br><br>Here is the thread: <a href="http://puredata.hurleur.com/viewtopic.php?pid=37895" target="_blank">http://puredata.hurleur.com/viewtopic.php?pid=37895</a><br><br>I answer your mail right there. Could you take a look?<br><br>Anyway, as I writed there, I WILL CHECK IT AGAIN, AND I WILL DO SOME <br>OTHER TESTS.<br><br><br><br><br><br>El 05/08/13 10:36, J Oliver escribió:<br>> Hi Mario,<br>><br>> There is a thread somewhere about connections vs. s/r & throw/catch, don't have time right now to search for it, but I'm sure it is there. If I remember correctly the overhead is not that big and you don't want to be connecting all that stuff by hand.<br>><br>> In any case, there are other things to look for.<br>><br>> If you are using graphics objects, or objects like
env~ you might want to bring down the refresh rate. Are there any [metro 1] or similar objects lying around which you might have forgotten about?<br>><br>> Do you have a lot of GOP? I am not sure this is entirely relevant, but it might be worth researching...<br>><br>> Also, control operations do take some cpu. do you have a big control layer?<br>><br>> J<br>><br>>> Thanks, Roman, but I'm already using [switch~] inside each FX, to stop processing the signal. I learned it some time ago, from here:<br>>><br>>> <a href="http://puredata.hurleur.com/viewtopic.php?pid=35939#p35939" target="_blank">http://puredata.hurleur.com/viewtopic.php?pid=35939#p35939</a><br>>><br>>> But I think that [receive~] and [throw~] are still using CPU.<br>>><br>>> I didn't try to use inlet~ and outlet~, because I have to make 400 conections at hand... that's why I asking first. If it will work, I'll do it (or find a
way to automatically do it)<br>>><br>>><br>>><br>>><br>>><br>>> El 05/08/13 09:29, Roman Haefeli escribió:<br>>>> Hi Mario<br>>>><br>>>> Check [switch~] and its help patch.<br>>>><br>>>> Roman<br>>>><br>>>><br>>>> On Mon, 2013-08-05 at 09:03 -0300, Mario Mey wrote:<br>>>>> Hi, there... I really need some help.<br>>>>><br>>>>> I'm working on a looper-multi-effects (big) patch. It has more than,<br>>>>> more or less, 100 stereo FXs. They are all inside the patch as<br>>>>> abstracts. But, to avoid them to consume CPU, each one has a [switch~ 0]<br>>>>> if it is not working. So, there're only two FX at a time, where the DSP<br>>>>> is on. Something like this:<br>>>>><br>>>>> Main patch:<br>>>>><br>>>>>
adc~<br>>>>> | \<br>>>>> | [s $0-pre-r]<br>>>>> [s $0-pre-l]<br>>>>><br>>>>> [catch~ $0-post-l]<br>>>>> | [catch~ $0-post-r]<br>>>>> | /<br>>>>> [dac~]<br>>>>><br>>>>> (the same for<br>>>>><br>>>>> Each FX as file-abstracts (using [fx1 $0] to call them) inside the main<br>>>>> patch:<br>>>>><br>>>>> [r $1-pre-l] [r $1-pre-r]<br>>>>> | /<br>>>>> [The-FX-itself.....]<br>>>>> | \<br>>>>> [throw~ $1-post-l] [throw~ $1-post-r]<br>>>>><br>>>>><br>>>>> [0(
[1(<br>>>>> | /<br>>>>> [switch~]<br>>>>><br>>>>><br>>>>> This technics DOES work very well. Buuut... when having 100 FX at the<br>>>>> same time (even not working), the CPU increase 15-20%. I repeat,<br>>>>> there're only two FX working at the time. The rest are "turned-off".<br>>>>><br>>>>> For now, the CPU use is:<br>>>>><br>>>>> Ready-to-use, 2 FXs on, DSP on: 47%<br>>>>> Recorded and playing 8 stereo-banks, 2 FXs being used, DSP on: 60 - 62%<br>>>>> (I have quite a few XRUNS)<br>>>>> Ready-to-use, 2 FXs on, DSP off: 7%<br>>>>><br>>>>> As you can see, the non-signal processing is very low.<br>>>>><br>>>>> What I think is that each FX is working when receiving and/or throwing<br>>>>> signal (200
[receive~] and [throw~] objects)... even they are sending<br>>>>> and/or processing nothing.<br>>>>><br>>>>> Is there any other way to connect all the FXs to the main patch and to<br>>>>> have a lower CPU consumption?<br>>>>><br>>>>> Maybe [inlet~] and [outlet~] consume less CPU? (I should connect all the<br>>>>> FX at hand... or find a aumotated way to do it)<br>>>>><br>>>>> Thanks a lot.<br>>>>><br>>>>><br>>>>><br>>>>><br>>>>> Mario Mey<br>>>>><br>>>>> _______________________________________________<br>>>>> <a ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>>>>> UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list"
target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>>>><br>>>> _______________________________________________<br>>>> <a ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>>>> UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>>><br>>> _______________________________________________<br>>> <a ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>>> UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br><br><br>_______________________________________________<br><a ymailto="mailto:Pd-list@iem.at" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>UNSUBSCRIBE and
account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br><br></div> </div> </div> </blockquote></div> </div></body></html>