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
Bypass streams not use a selector
7 posts
• Page 1 of 1
Bypass streams not use a selector
How can I turn off the stream not use a selector? I use it to switch to different algorithms (to save CPU cycles), if is not much switching everything works fine, but if you want to quickly switch a lot, the problems begin. strong jumps CPU load, and clicks.
Can think of two solutions.
Not use selectors (but CPU cycles)
Find alternative
I tried use DSP code, it does not turn off stream and the load is not reduced, is there any other way to turn off the stream?
Can think of two solutions.
Not use selectors (but CPU cycles)
Find alternative
I tried use DSP code, it does not turn off stream and the load is not reduced, is there any other way to turn off the stream?
- Logado
- Posts: 62
- Joined: Tue Jan 06, 2015 5:42 pm
Re: Bypass streams not use a selector
you also could think of restructuring your schematic to use less selectors at the same time, the other would be to bypass cpu heavy parts with asm
viewtopic.php?f=2&t=2509&hilit=bypass+asm+code
whats the best is very individual and depends on the schematic...
viewtopic.php?f=2&t=2509&hilit=bypass+asm+code
whats the best is very individual and depends on the schematic...
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Bypass streams not use a selector
I'm new to dsp and asm, but with Custom DSP Code 2 (comunity project) nice method
- Logado
- Posts: 62
- Joined: Tue Jan 06, 2015 5:42 pm
Re: Bypass streams not use a selector
Yes, selectors in flowstone and if-esle statements in DSPcode2 work in completely different way.
When you flick a selector, it causes the stream-part of the schematic to recompile.
upsides:
+only the parts that should be executed are present in the machine code at any time ( =maximum performance).
+whole chains of modules may be switched off using selector.
downsides:
-selector is not sample precise, because recompilation cannot happen at sample rate (it happens in between ASIO buffers)
-recompilation uses quite a lot of CPU = creates a CPU spike when it happens.
-it causes all streams to reset = it may cause clicks even in parts that are not directly connected to the selector.
If else statements use conditional jumps to skip certain parts of the code, when condition is false
upsides:
+it happens at sample-rate and effect is instantaneus = you may flick the code on/off at any rate you want.
+no recompilation is needed = no additional CPU cost when switching and no clicks
downsides:
-Code you want to switch must be in the same ASM/code component = no multi-module skipping.
-the condition and jump mechanism takes some CPU too = when no switching is happening Selector will be lighter on CPU.
When you flick a selector, it causes the stream-part of the schematic to recompile.
upsides:
+only the parts that should be executed are present in the machine code at any time ( =maximum performance).
+whole chains of modules may be switched off using selector.
downsides:
-selector is not sample precise, because recompilation cannot happen at sample rate (it happens in between ASIO buffers)
-recompilation uses quite a lot of CPU = creates a CPU spike when it happens.
-it causes all streams to reset = it may cause clicks even in parts that are not directly connected to the selector.
If else statements use conditional jumps to skip certain parts of the code, when condition is false
upsides:
+it happens at sample-rate and effect is instantaneus = you may flick the code on/off at any rate you want.
+no recompilation is needed = no additional CPU cost when switching and no clicks
downsides:
-Code you want to switch must be in the same ASM/code component = no multi-module skipping.
-the condition and jump mechanism takes some CPU too = when no switching is happening Selector will be lighter on CPU.
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Bypass streams not use a selector
Could someone perhaps provide an exhaustive list of things that need to be disconnected for a stream to "shut off?" What I mean is while it usually works fine to bypass a small, simple section with a selector, bigger and more complicated stream sections often won't switch off simply by using a selector at the end of the stream. One thing I'm pretty sure will keep the streams open is the mono2float component, but I'm sure there are other things.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Bypass streams not use a selector
Perfect Human Interface wrote:Could someone perhaps provide an exhaustive list of things that need to be disconnected for a stream to "shut off?" What I mean is while it usually works fine to bypass a small, simple section with a selector, bigger and more complicated stream sections often won't switch off simply by using a selector at the end of the stream. One thing I'm pretty sure will keep the streams open is the mono2float component, but I'm sure there are other things.
Stream branch is active if at least one of its outputs leads to following prims (even if it's through several modules):
mono2float, mono2floatArray and its varants, mono2frame, soundcard output.
Following prims may have mono connector, but they do NOT force stream to be active, because they only route the streams:
output prim, wireless output prim, selector, multiplexer, mem write prims.
I might have forgotten some...
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Bypass streams not use a selector
KG_is_back wrote:I might have forgotten some...
It's enough to get me started at the least; thank you! It's almost strange to me that you even know this stuff off the top of your head. Actually, at this point I'm starting to feel like a whole new volume of documentation could be written just based on answers to all the questions I've asked.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 123 guests