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
Re: tula's DSP modules
Awesome! Thanks for sharing! I agree to Spogg: I love this topicTheOm wrote: There is actually an even simpler method to get a sign mask in dsp code:Code: Select all
float signbit = -0;
"There lies the dog buried" (German saying translated literally)
Polarity Splitter
Another one of those very simple modules. The polarity splitter sends the positive and negative parts of the waveform to its own streams. This might be useful to combine different waveforms in order to use as an lfo, or something like that. I doubt that there is any application for a sound oscillator, but if you find one: please share!
- Attachments
-
- polarity_splitter.fsm
- (7.52 KiB) Downloaded 1061 times
"There lies the dog buried" (German saying translated literally)
Bit Depth Reducer
Reducing the bit depth lowers the quality of the waveform, which is wanted in effects like a bit crusher. However, it uses rndint() and this turns out to be expensive (100+ cycles per sample). If someone knows how to round fractions without that function (and without Assembler) and to be more lightweight, I'm all yours!
p.s. my ears are so bad, that I only start hearing differences from 7 to 6 bits. Everything above 7 bits sounds the same to me.
p.s. my ears are so bad, that I only start hearing differences from 7 to 6 bits. Everything above 7 bits sounds the same to me.
- Attachments
-
- bit_depth_reducer.fsm
- (41.85 KiB) Downloaded 1104 times
"There lies the dog buried" (German saying translated literally)
-
KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: tula's DSP modules
one possibility on how to round numbers is to subtract modulo 1. This is loosely equivalent to ruby's ".floor" method.tulamide wrote:Reducing the bit depth lowers the quality of the waveform, which is wanted in effects like a bit crusher. However, it uses rndint() and this turns out to be expensive (100+ cycles per sample). If someone knows how to round fractions without that function (and without Assembler) and to be more lightweight, I'm all yours!
p.s. my ears are so bad, that I only start hearing differences from 7 to 6 bits. Everything above 7 bits sounds the same to me.
Code: Select all
y=x-x%1;
There is one way to do it but it only works for positive numbers - add and then subtract 2^23.
Code: Select all
out=(in+8388608)-8388608;Re: tula's DSP modules
Code: Select all
streamin in;
streamin bits;
streamout out;
float Round = 1e07;
out = ( (in * bits) - Round + Round ) / bits;- martinvicanek
- Posts: 1334
- Joined: Sat Jun 22, 2013 8:28 pm
Re: tula's DSP modules
Have fun!
- Attachments
-
- FastStreamBitcrusher(noASM).fsm
- (3.17 KiB) Downloaded 1149 times
Re: tula's DSP modules
Very cool!martinvicanek wrote:Have fun!
Re: Bit Depth Reducer
At 12 bits and lower I can start to hear the quantisation as a kind of background noise. Listen to the attached version on headphones and play in the bass register.tulamide wrote: I only start hearing differences from 7 to 6 bits. Everything above 7 bits sounds the same to me.
This was apparent on the old DX7 on single sine waves in the bass registers, especially as the bass decayed away. The system ran at 12 bits. On the DX7 it was made worse by multiplexing the operator (there was only one hardware operator).
Still loving this topic
Spogg
- Attachments
-
- bit_depth_reducer spogg 1.fsm
- (249.79 KiB) Downloaded 1069 times
Re: tula's DSP modules
I can't because I don't understand what you did theremartinvicanek wrote:Have fun!
Spogg
Re: tula's DSP modules
Guys, thank you all so much! It is overwhelming.
Spogg: Thanks for your (better) readout knob and Martin's ADSR (I didn't know about that one!), and I have a clue regarding Martin's solution. It is pretty much the same principle that KG laid out as second possibility. Rounding by overloading the float bits.
Martin: Impressive. CPU cycles down to approx. 22 (I have to compare them on my system, everything else wouldn't make much sense). However, Adam is very close to you!
Adam: Very nice trick! Just using the subtract/add trick, it already fell down to approx. 28 cycles. If I provide 1/bits externally and multiply, I expect your code to be on par or maybe even faster than Martin's!! Also, I learned from your code, that I can enter numbers in scientific notation. I didn't know that. Thank you!
KG: I love how detailed you explain the things. That really helps me a lot. It rings my sense of logic. I'm pretty sure that both, Adam's and Martin's solutions are somehow based on the same trick of overloading the accuracy of the float datatype.
Please don't stop providing such useful help, hints and hacks!
Spogg: Thanks for your (better) readout knob and Martin's ADSR (I didn't know about that one!), and I have a clue regarding Martin's solution. It is pretty much the same principle that KG laid out as second possibility. Rounding by overloading the float bits.
Martin: Impressive. CPU cycles down to approx. 22 (I have to compare them on my system, everything else wouldn't make much sense). However, Adam is very close to you!
Adam: Very nice trick! Just using the subtract/add trick, it already fell down to approx. 28 cycles. If I provide 1/bits externally and multiply, I expect your code to be on par or maybe even faster than Martin's!! Also, I learned from your code, that I can enter numbers in scientific notation. I didn't know that. Thank you!
KG: I love how detailed you explain the things. That really helps me a lot. It rings my sense of logic. I'm pretty sure that both, Adam's and Martin's solutions are somehow based on the same trick of overloading the accuracy of the float datatype.
Please don't stop providing such useful help, hints and hacks!
"There lies the dog buried" (German saying translated literally)