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
tula's DSP modules
41 posts
• Page 2 of 5 • 1, 2, 3, 4, 5
Re: tula's DSP modules
RJHollins wrote:Thanks T.
Are there any DSP sites that you're researching from ?
No, but I'm sure that will happen, once I enter the "complex zone"
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: tula's DSP modules
tulamide wrote:RJHollins wrote:Thanks T.
Are there any DSP sites that you're researching from ?
No, but I'm sure that will happen, once I enter the "complex zone"
Alright ... well ... be safe ... report back ... hope ya keep post findings ....
and maybe we'll get more group insights/explanations.
I learned some new stuff already from this thread.
thx
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: tula's DSP modules
Here's a poly stream-controlled inverter I knocked up, together with a demo test synth attached.
I wonder if this could be made more efficiently in DSP code...
Cheers
Spogg
I wonder if this could be made more efficiently in DSP code...
Cheers
Spogg
- Attachments
-
- Stream controlled inverter -Spogg .fsm
- (552.05 KiB) Downloaded 1016 times
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: tula's DSP modules
Hey Spogg,
thanks for participating! Interesting question. I came to the conclusion that basically you only care for a sign switch (positive switch input = +1, negative switch input = -1). I always look at all modules, Martin shares with us. In the past, it didn't help me the slightest bit. But now that I slowly start to understand the dsp editor, I remembered that I once saw a sign bitmask in some of Martin's modules.
I have no clue what exactly is happening to the bits, but I know what a sign function does in higher level programming languages. And since it is a bitmask, I knew I had to somehow bitwise combine it with the switch. After several tries, I came up with this
The final code then looks like so:
What do you think? And what do the DSP gurus think?
thanks for participating! Interesting question. I came to the conclusion that basically you only care for a sign switch (positive switch input = +1, negative switch input = -1). I always look at all modules, Martin shares with us. In the past, it didn't help me the slightest bit. But now that I slowly start to understand the dsp editor, I remembered that I once saw a sign bitmask in some of Martin's modules.
- Code: Select all
sgn = -1&-2 //sign bitmask defined in stage 0
I have no clue what exactly is happening to the bits, but I know what a sign function does in higher level programming languages. And since it is a bitmask, I knew I had to somehow bitwise combine it with the switch. After several tries, I came up with this
- Code: Select all
1|(switch&sgn) //results in either -1 or 1
The final code then looks like so:
What do you think? And what do the DSP gurus think?
- Attachments
-
- Stream controlled inverter -Spogg(tula) .fsm
- (86.11 KiB) Downloaded 1033 times
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: tula's DSP modules
Yup, tula's inverter does the same as Spogg's and is more efficient.
It is probably not meant to be used as in the schematic because it aliases quite heavily.
It is probably not meant to be used as in the schematic because it aliases quite heavily.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: tula's DSP modules
Hey well done tulamide!
Nobody noticed I got the inv and noninv names crossed, not that it matters for the result.
My first attempt was to get the whole job done in just one line of code, but I failed to find a method.
I like this topic!
Spogg
Nobody noticed I got the inv and noninv names crossed, not that it matters for the result.
My first attempt was to get the whole job done in just one line of code, but I failed to find a method.
I like this topic!
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: tula's DSP modules
tulamide wrote:
- Code: Select all
sgn = -1&-2
There is actually an even simpler method to get a sign mask in dsp code:
- Code: Select all
float signbit = -0;
Unfortunately you can not use xor in dsp code, otherwise one could simplify the code to
- Code: Select all
out = in ^ (switch & signbit);
This is why I don't like the dsp code module, it is limiting because it doesn't have all the features and the generated asm code is poor.
- TheOm
- Posts: 103
- Joined: Tue Jan 28, 2014 7:35 pm
- Location: Germany
Re: tula's DSP modules
TheOm wrote:There is actually an even simpler method to get a sign mask in dsp code:
- Code: Select all
float signbit = -0;
Cool!
Do you happen to have a simpler expression for the abs bitmask as well?
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: tula's DSP modules
martinvicanek wrote:Do you happen to have a simpler expression for the abs bitmask as well?
No, unfortunately not without using stage0. I don't think there's a way to type NaN in the code module, is there?
- TheOm
- Posts: 103
- Joined: Tue Jan 28, 2014 7:35 pm
- Location: Germany
Re: tula's DSP modules
TheOm wrote:
Unfortunately you can not use xor in dsp code, otherwise one could simplify the code to
- Code: Select all
out = in ^ (switch & signbit);
This is why I don't like the dsp code module, it is limiting because it doesn't have all the features and the generated asm code is poor.
Assuming the ^ symbol means XOR it'll be available in the 3.09 release according to the list I have. The DSP code will be extended considerably.
Cheers
Spogg
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
41 posts
• Page 2 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: Google [Bot] and 22 guests