If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Lowering CPU usage, best methods
3 posts
• Page 1 of 1
Lowering CPU usage, best methods
Hello Gang,
If creating an effect or synth with say lots of knobs, selectors, switches, matrix and or cable patching, and other modules like, lots of oscillators, filters, ADSR's, wave shapers, and so on (not necessary all of these), what are some methods to keep CPU usage at it's lowest.
I have been playing around with an old Serge modular idea where anything can be patched to anything, and so far the idea does work (just experiments now), but CPU usage is as high as 5 to 10. This is fine on my computer because it's fast with 16 gigs of memory, but I would never think of releasing anything like it.
Thanks and hope to see lot's of answers for this one, BobF.....
If creating an effect or synth with say lots of knobs, selectors, switches, matrix and or cable patching, and other modules like, lots of oscillators, filters, ADSR's, wave shapers, and so on (not necessary all of these), what are some methods to keep CPU usage at it's lowest.
I have been playing around with an old Serge modular idea where anything can be patched to anything, and so far the idea does work (just experiments now), but CPU usage is as high as 5 to 10. This is fine on my computer because it's fast with 16 gigs of memory, but I would never think of releasing anything like it.
Thanks and hope to see lot's of answers for this one, BobF.....
- BobF
- Posts: 598
- Joined: Mon Apr 20, 2015 9:54 pm
Re: Lowering CPU usage, best methods
If you have larger parts of the schematic in green make sure to block all innecessary triggers. Do some testing: place a trigger counter at various points and see how many triggers are registered when you send in a single one.
if major calculations are done in stream or poly, consider hopping instead of updating at sample rate. Typical candidates are control signals, LFOs, even envelope generators.
if major calculations are done in stream or poly, consider hopping instead of updating at sample rate. Typical candidates are control signals, LFOs, even envelope generators.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Lowering CPU usage, best methods
hi Bob,
Other thing with stream/poly stuff is to avoid unneccessary processing & repeat calculations. Very often you can make use of stage(0) to calculate parameters just once at the start of a note or process, rather than repeating the calculations on every single sample - makes a massive difference.
In another thread (viewtopic.php?f=4&t=23560&start=0) I recently established that in Assembler the ecx register - which in FS is used as the sample counter - always resets to zero whenever a new note is pressed (in any SSE group of 4), and this fact too can be used to isolate the very first pass of your code to great effect, similar to stage(0). Or to isolate any cycle in fact, if you want to avoid everything trying to summon the cpu at the same time.
Another tip is to try to amalgamate DSP modules; I think I'm right in saying that every module-out and module-in connection is in reality a memory write and a memory read (I expect there's more to it ...) so if you can combine 2 modules into 1, or - why not - 3 or 4 or more into 1 you are avoiding umpteen memory accesses.
If you can get the hang of migrating DSP code to Assembler then there is invariably a massive cpu saving available by optimising the code, particularly substituting one of the 8 xmm registers (xmm0..xmm7) in place of variables - again avoiding memory accesses. And really satisfying when you get it to work - mental bonus! Go to Flowstone Guru site for all the good stuff with that.
I'm permanently on FS64 nowadays, and getting amazingly low cpu %ges and big polyphony. I have more tricks that you can now do only on FS64 if of interest
Hugh
Other thing with stream/poly stuff is to avoid unneccessary processing & repeat calculations. Very often you can make use of stage(0) to calculate parameters just once at the start of a note or process, rather than repeating the calculations on every single sample - makes a massive difference.
In another thread (viewtopic.php?f=4&t=23560&start=0) I recently established that in Assembler the ecx register - which in FS is used as the sample counter - always resets to zero whenever a new note is pressed (in any SSE group of 4), and this fact too can be used to isolate the very first pass of your code to great effect, similar to stage(0). Or to isolate any cycle in fact, if you want to avoid everything trying to summon the cpu at the same time.
Another tip is to try to amalgamate DSP modules; I think I'm right in saying that every module-out and module-in connection is in reality a memory write and a memory read (I expect there's more to it ...) so if you can combine 2 modules into 1, or - why not - 3 or 4 or more into 1 you are avoiding umpteen memory accesses.
If you can get the hang of migrating DSP code to Assembler then there is invariably a massive cpu saving available by optimising the code, particularly substituting one of the 8 xmm registers (xmm0..xmm7) in place of variables - again avoiding memory accesses. And really satisfying when you get it to work - mental bonus! Go to Flowstone Guru site for all the good stuff with that.
I'm permanently on FS64 nowadays, and getting amazingly low cpu %ges and big polyphony. I have more tricks that you can now do only on FS64 if of interest
Hugh
-
HughBanton - Posts: 265
- Joined: Sat Apr 12, 2008 3:10 pm
- Location: Evesham, Worcestershire
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 66 guests