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
Oversampling Toolkit (Revisited)
28 posts
• Page 3 of 3 • 1, 2, 3
Re: Oversampling Toolkit (Revisited)
Wow, you are a genius, Tronic! Pity I haven't time right now to check it out in depth.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Oversampling Toolkit (Revisited)
martin're too kind
I just port the implementation of Laurent de Soras, in language more friendly, like Ruby.
I just port the implementation of Laurent de Soras, in language more friendly, like Ruby.
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: Oversampling Toolkit (Revisited)
Thanks Tronic, the coeffs are indeed generated by this code. You can reproduce them with transition = 0.01 (hard slope) and 0.05 (soft slope).
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: Oversampling Toolkit (Revisited)
Thank you very much for sharing these.
I am currently using the Order 10 hard slope version in a project (a distortion plugin).
During optimizing I first changed the upsampler to do the filtering for odd and even samples simultaneously, because I only have a stereo input signal.
When I wanted to do the same thing for the downsampler I was a bit surprised to see that the downsampler does twice the amount of work that the upsampler does, which seemed strange to me. So I looked closer and it seems like f2outEven and f1outOdd are calculated, but never actually used.
When I removed those calculations I could not notice any kind of change in behaviour, so I think they really are superfluous.
Also another thing that I noticed while testing:
Changing from not oversampled to x2 oversampled reduces aliasing by a fair amount.
But I could not see any difference between x2 and x4 upsampling. Why is that?
I am currently using the Order 10 hard slope version in a project (a distortion plugin).
During optimizing I first changed the upsampler to do the filtering for odd and even samples simultaneously, because I only have a stereo input signal.
When I wanted to do the same thing for the downsampler I was a bit surprised to see that the downsampler does twice the amount of work that the upsampler does, which seemed strange to me. So I looked closer and it seems like f2outEven and f1outOdd are calculated, but never actually used.
When I removed those calculations I could not notice any kind of change in behaviour, so I think they really are superfluous.
Also another thing that I noticed while testing:
Changing from not oversampled to x2 oversampled reduces aliasing by a fair amount.
But I could not see any difference between x2 and x4 upsampling. Why is that?
- Attachments
-
- Oversampling Kit 5 (MyCo) The Om Tanh test.fsm
- (239.33 KiB) Downloaded 1427 times
- TheOm
- Posts: 103
- Joined: Tue Jan 28, 2014 7:35 pm
- Location: Germany
Re: Oversampling Toolkit (Revisited)
TheOm wrote:So I looked closer and it seems like f2outEven and f1outOdd are calculated, but never actually used.
That's not true. Those variables are used in a loop. So on the next sample they are read before they get overridden. And their values are at the end used to calculate the interpolated final output ("out") by using their corresponding xmm registers.
TheOm wrote:When I removed those calculations I could not notice any kind of change in behaviour, so I think they really are superfluous.
You actually didn't remove em, you just shuffled them to different SSE channels and at the end you shuffle them back and interpolate. That's not surprising me, it's actually how you would do it when you don't rely on all 4 channels. Martin mentioned that as well earlier:
MyCo wrote:martinvicanek wrote:You could exploit SSE to squeeze out still more (unless you really need to process all 4 channels in parallel)
I didn't want to go that way, because I thought about using it for oscillators in a poly section.
TheOm wrote:But I could not see any difference between x2 and x4 upsampling. Why is that?
Yeah, the problem is, it hardly depends on the aliasing your code is generating. When you take the rate reducer example in this thread, you can clearly see the difference. The higher oversampling order only makes sense when you have aliasing above twice the sampling rate (4 times the nyquist).
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: Oversampling Toolkit (Revisited)
This is the usage of the channels in xmm0 in my version of the downsampler:
xmm0[0]: Filter1, Even, Left
xmm0[1]: Filter1, Even, Right
xmm0[2]: Filter2, Odd, Left
xmm0[3]: Filter2, Odd, Right
Notice that I am neither calculating Filter 2 for the Even Samples nor Filter 1 for the Odd samples, but the output is still identical to your original version.
It's also pretty easy to see in the blue code version that f2outEven and f1outOdd do not contribute anything to the output.
xmm0[0]: Filter1, Even, Left
xmm0[1]: Filter1, Even, Right
xmm0[2]: Filter2, Odd, Left
xmm0[3]: Filter2, Odd, Right
Notice that I am neither calculating Filter 2 for the Even Samples nor Filter 1 for the Odd samples, but the output is still identical to your original version.
It's also pretty easy to see in the blue code version that f2outEven and f1outOdd do not contribute anything to the output.
- TheOm
- Posts: 103
- Joined: Tue Jan 28, 2014 7:35 pm
- Location: Germany
Re: Oversampling Toolkit (Revisited)
Yeah, something is messed up there. Not sure if I just forgotten to remove that when optimizing the code, or if the filters should actually be joined and I made a mistake.
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: Oversampling Toolkit (Revisited)
I've updated the kit. So the unused code is removed. Download is in the first post.
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
28 posts
• Page 3 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 66 guests