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
Double Stream
10 posts
• Page 1 of 1
Double Stream
What are the Double Stream prims for?
I have looked on the SM forum and all I could find was they were used to get the sampler working properly???
Are they actual DOUBLE PRECISION prims?? Is it better to use them for things like filters ect? My logic tells me yes because they are more accurate & for filters the rounding errors from low resolution can be problematic.
I have looked on the SM forum and all I could find was they were used to get the sampler working properly???
Are they actual DOUBLE PRECISION prims?? Is it better to use them for things like filters ect? My logic tells me yes because they are more accurate & for filters the rounding errors from low resolution can be problematic.
- Drnkhobo
- Posts: 312
- Joined: Sun Aug 19, 2012 7:13 pm
- Location: ZA
Re: Double Stream
Yes, you're exactly right - in fact, I'm pretty sure there are some double-precision bi-quad filter examples already somewhere on the SM forum.
Take care if you're making any kind of design that uses feedback loops with stream primitives - you have to get the link order exactly right, otherwise it might not work as expected.
Only problem is, there are no doubles for poly, DSP code or assembly - so we're quite limited on where they can be used.
Take care if you're making any kind of design that uses feedback loops with stream primitives - you have to get the link order exactly right, otherwise it might not work as expected.
Only problem is, there are no doubles for poly, DSP code or assembly - so we're quite limited on where they can be used.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Double Stream
Thanks Trog, you mention link order for stream prims. . . Crap!
Can you elaborate there for me?
I have seen the examples (tor I think) where they are used just before an asm block. I think he used them to calculate one part of the filter . . . I get lost in digital filters sometimes
Why no poly / dsp / asm double connectors?
Can you elaborate there for me?
I have seen the examples (tor I think) where they are used just before an asm block. I think he used them to calculate one part of the filter . . . I get lost in digital filters sometimes
Why no poly / dsp / asm double connectors?
- Drnkhobo
- Posts: 312
- Joined: Sun Aug 19, 2012 7:13 pm
- Location: ZA
Re: Double Stream
Drnkhobo wrote:Can you elaborate there for me?
With a bi-quad, you usually see something like this somewhere in the code...
- Code: Select all
out2 = out1
out1 = out
...basically a very short delay line, so that 'out1' and 'out2' are the previous sample, and the one before that.
If you changed the command order...
- Code: Select all
out1 = out
out2 = out1
...it's now broken, because in2 and in1 end up with the same value.
In code, that's really easy to see - the commands are just a list that goes from top to bottom.
But with primitives, if a single output is linked to more than one input, the order that you make the links decides which way around the following primitives get executed. (seen as the little "ticks" at the end of the links).
When you have feedback, this gets much more critical - do it in the wrong order, and you can easily end up with an extra sample of delay where you didn't intend to, which will throw out the frequency response.
Drnkhobo wrote:Why no poly / dsp / asm double connectors?
You will have seen the 'mono4' streams, where four channels get processed as if they were all one.
Within the CPU, this uses special SSE commands that allow four of any operation to happen at the same time - a primitive form of 'parallel processing' that hugely reduces CPU load. In SSE, all variables are really 128bits wide - four 32bit floats combined.
Poly uses it to process voices in batches of four, so four notes uses the same CPU as only one.
And with DSP code and ASM, you might have noticed that a lot of modules have the 'black' connectors that automatically change to the correct type - this is only possible because '4-way' code is used even for mono (with 3 unused 'channels'). This allows exactly the same code to be used for all of the normal streams most of the time, which is very handy indeed!
The 'double' streams are an exception to the rule - you can't fit four of them into the same size as four singles, making them incompatible with the code for all the other types. Hence you need the special primitives to convert between the two.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Double Stream
by the way, Trog, do you know how are the double streams implemented? through FPU (using fmul; fadd; and fsub; ) or through SSE double precision instructions?
By the way, some time ago I made several modules related to Double precision streams. Namely Double division (through newton method) and double precision looseless delay. They are slightly messy looking, because Doubles can't be connected to module inputs and outputs.
By the way, some time ago I made several modules related to Double precision streams. Namely Double division (through newton method) and double precision looseless delay. They are slightly messy looking, because Doubles can't be connected to module inputs and outputs.
- Attachments
-
- DP modules.fsm
- (2.85 KiB) Downloaded 869 times
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Double Stream
KG_is_back wrote:by the way, Trog, do you know how are the double streams implemented?
No idea - the only assembly I know is the sub-set that's allowed in the ASM primitiv.!
TBH, I've barely used them, aside from the standard fractional sample index stuff (copy and pasted! he he)
KG_is_back wrote:By the way, some time ago I made several modules related to Double precision streams
Ooh, those are very nice - definitely going in the toolbox! They show why I hardly used the double prim's - I just don't have the maths ability (or patience) for that kind of stuff!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Double Stream
KG thanks for the modules. . . I see what Trog means about the patience for them!
So, the question then is, what difference does it REALLY make with filters. . .
Im going to do some tests with the Biquad DP module. I will post results here
So, the question then is, what difference does it REALLY make with filters. . .
Im going to do some tests with the Biquad DP module. I will post results here
- Drnkhobo
- Posts: 312
- Joined: Sun Aug 19, 2012 7:13 pm
- Location: ZA
Re: Double Stream
I've tested it in the past. Result is that DP filters have considerably less rounding noise. Here, look at this schematic:
It has a peaking filter set to 12dB boost at the same cutoff frequency as incoming sine wave. Then the same sine wave but 12dB boosted is subtracted. Ideal result should be silence at all time, but reality is somewhat different. Cutoff frequency of a filter is never perfect (you'd need infinite precision coefficients) so small part of sine wave bleeds through (gain difference). Also, what is more interesting both single and double precision filters introduce rounding noise, which is stronger, lower the input frequency is. It happens because coefficients become very different in amplitude and more rounding therefore happens in adding within filter.
DP filters have significantly less noise than single, because they work with more precise values = less rounding.
The difference between full DP and DP with SP feedback is very subtle.
It has a peaking filter set to 12dB boost at the same cutoff frequency as incoming sine wave. Then the same sine wave but 12dB boosted is subtracted. Ideal result should be silence at all time, but reality is somewhat different. Cutoff frequency of a filter is never perfect (you'd need infinite precision coefficients) so small part of sine wave bleeds through (gain difference). Also, what is more interesting both single and double precision filters introduce rounding noise, which is stronger, lower the input frequency is. It happens because coefficients become very different in amplitude and more rounding therefore happens in adding within filter.
DP filters have significantly less noise than single, because they work with more precise values = less rounding.
The difference between full DP and DP with SP feedback is very subtle.
- Attachments
-
- doubleprecision biquad.fsm
- (26.52 KiB) Downloaded 879 times
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: Double Stream
KG, apparently the DF2 filter topology introduces measurable noise at very low frequencies (SNR is about 80 dB at 15 Hz and much better for higher frequencies). Certainly good enough for Rock 'n Roll. However, you can obtain better results with other topologies, for instance ZDF or even DF1 (although the latter has other problems at very low frequencies). No need to go double precision if you ask me.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Double Stream
martinvicanek wrote:KG, apparently the DF2 filter topology introduces measurable noise at very low frequencies (SNR is about 80 dB at 15 Hz and much better for higher frequencies). Certainly good enough for Rock 'n Roll. However, you can obtain better results with other topologies, for instance ZDF or even DF1 (although the latter has other problems at very low frequencies). No need to go double precision if you ask me.
Yes, direct form II is a total failure in low frequencies. Double precision DF2 is as noisy as single precision DF1. And I also agree that ZDF is much better in general and beats double precision direct form filters even in single precision.
But then there's the marketing side of thing. Your product immediately sounds better when you have phrase "uses double precision processing" in your plugin description
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 64 guests