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
CPU optimization
5 posts
• Page 1 of 1
CPU optimization
I'm looking for ways to decrease the CPU utilization of my schematic without (yet anyway) resorting to assembly level stuff. One of the sections has 5 EQ bands, each of which can be selected to be one of the biquad family. I put in the 4 that I use the most (adjustable Q HP, adjustable Q LP, parametric peak/dip, and bass shelf), plus a bypass. I packed the stereo signal before going in the EQ block, which helps, but having all those filters idling when nothing is going into them seems like an area for big improvement.
Is there a way I can "shut down" a code section when no signal is present? In this case, there is a multiplexer upstream (driven by the filter selection) that sends the packed stream to one of the five choices (the four filters or the bypass route), so the unselected ones appear to be churning away, processing a non-existent signal. My first thought was to combine all the filters into one code block, which is easy with if/then/else branching, but I don't see how to mimic easily with masks.
Any suggestions for either method? Thanks in advance!
Is there a way I can "shut down" a code section when no signal is present? In this case, there is a multiplexer upstream (driven by the filter selection) that sends the packed stream to one of the five choices (the four filters or the bypass route), so the unselected ones appear to be churning away, processing a non-existent signal. My first thought was to combine all the filters into one code block, which is easy with if/then/else branching, but I don't see how to mimic easily with masks.
Any suggestions for either method? Thanks in advance!
- flowstone
- Posts: 21
- Joined: Fri Aug 27, 2010 10:53 pm
Re: CPU optimization
One option is to use a State Variable Filter. This is a single module that does all of the general filter types:
Bandpass, Hi-Pass, Low-Pass, Band Reject and Bypass
Here is an example: http://www.dsprobotics.com/support/viewtopic.php?f=11&t=95
Bandpass, Hi-Pass, Low-Pass, Band Reject and Bypass
Here is an example: http://www.dsprobotics.com/support/viewtopic.php?f=11&t=95
-
admin - Site Admin
- Posts: 231
- Joined: Tue May 11, 2010 6:30 pm
Re: CPU optimization
flowstone wrote:Is there a way I can "shut down" a code section when no signal is present?
Yes there is (come on Admin, wakey wakey)
As in SynthMaker, the CPU usage of a module will be shut down as long as its outputs are disconnected - but not it's inputs. Which does, admittedly sound rather counter-intuitive.
So the solution is to use a Selector primitive to select the appropriate filter output, rather than a multiplexer to select an input.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: CPU optimization
Thanks for the insight! It didn't occur to me to "unplug" the outputs. I'll definitely give it a try.
Sincerely,
Clayton
Sincerely,
Clayton
- flowstone
- Posts: 21
- Joined: Fri Aug 27, 2010 10:53 pm
Re: CPU optimization
I bet we can get that CPU down a bit further too. If you can, post your schematic and we'll have a look..
Nice one Trog..
haha
edit:
Nevermind, I just noticed how old this post was.. haha
Nice one Trog..
haha
edit:
Nevermind, I just noticed how old this post was.. haha
- VPDannyMan
- Posts: 118
- Joined: Mon Jan 04, 2010 4:50 am
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 66 guests