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
12 posts
• Page 1 of 2 • 1, 2
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
...
end
Any examples out there?
- juha_tp
- Posts: 60
- Joined: Fri Nov 09, 2018 10:37 pm
Re: Conditional selection
I believe its only possible with assembler
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
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 ... ?
- juha_tp
- Posts: 60
- Joined: Fri Nov 09, 2018 10:37 pm
Re: Conditional selection
That would use way too much cpu, since it still calculates all your equations even if they are not "enabled"
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
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)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Conditional selection
I'd love to know the answer to this as well.
-
wlangfor@uoguelph.ca - Posts: 912
- Joined: Tue Apr 03, 2018 5:50 pm
- Location: North Bay, Ontario, Canada
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 1377 times
Last edited by juha_tp on Sat Jun 06, 2020 5:45 am, edited 4 times in total.
- juha_tp
- Posts: 60
- Joined: Fri Nov 09, 2018 10:37 pm
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
- adamszabo
- Posts: 667
- Joined: Sun Jul 11, 2010 7:21 am
Re: Conditional selection
OK, updated my previous post with schematic.
- juha_tp
- Posts: 60
- Joined: Fri Nov 09, 2018 10:37 pm
12 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 6 guests