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
Conditional selection
Conditional selection
If one wants to stay with DSP code component, how to code conditional selection?
pseudo code:
Any examples out there?
pseudo code:
Code: Select all
switch value
case (1, 3, 5, 7)
...
otherwise // 2, 4, 6, 8
...
endAny examples out there?
Re: Conditional selection
I believe its only possible with assembler
Re: Conditional selection
I did look that thread earlier but, could not find examples of usage since I need to make at least four operations (calculate coefficients using degree 3 polynomial equations) when the condition is true instead of just making one operation.
I guess "if" type statement could work if condition is checked for every coefficient calculation operation:
Code: Select all
if(x % 2 != 0) a0 = polynomial
if(x % 2 != 0) a1 = ...
if(x % 2 != 0) b0 = ...
if(x % 2 != 0) b1 = ...
if(x % 2 == 0) a0 = ...
...Could this be possible ... ?
Re: Conditional selection
That would use way too much cpu, since it still calculates all your equations even if they are not "enabled"
Re: Conditional selection
First thing that came to my mind was cubic interpolation, but you wouldn't need any conditionals for that, and it seems to be code for a filter. Maybe if you elaborate on the topic? Maybe there is another way?
Simple example, if you're only interested in every second sample, you could use hop(2) and had no need for the conditionals anymore.
Simple example, if you're only interested in every second sample, you could use hop(2) and had no need for the conditionals anymore.
"There lies the dog buried" (German saying translated literally)
- wlangfor@uoguelph.ca
- Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
- Contact:
Re: Conditional selection
I'd love to know the answer to this as well.
Re: Conditional selection
What I'm trying to do is a LR crossfeed plug-in without Ruby code. I'm using polynomials to calculate coefficients (in attached example I'm using BLT based implementation).
There's also something wrong with the LPF filter.
EDIT: attached the schematic
There's also something wrong with the LPF filter.
EDIT: attached the schematic
- Attachments
-
- Linkwitz-Riley Crossfeed_unfinished.fsm
- (1.83 KiB) Downloaded 1519 times
Last edited by juha_tp on Sat Jun 06, 2020 5:45 am, edited 4 times in total.
Re: Conditional selection
Its best if you post a schematic because we have no idea which filter you are using that is different from the left or right channel, these graphs dont really tell us anything
Re: Conditional selection
OK, updated my previous post with schematic.