Page 2 of 2

Re: Clean Rate Reducer help

Posted: Mon Oct 27, 2014 11:43 pm
by KG_is_back
martinvicanek wrote:I think that this will only be necessary if M is not an integer, though.


From the schematic Adam posted, this seems to be the case. The decimation factor (or its inverse to be more precisely) comes form the knob, which in fact gives non-integer values. Perhaps snapping them to integers might help?

Re: Clean Rate Reducer help

Posted: Tue Oct 28, 2014 5:57 am
by MyCo
Please don't take the wikipedia article as reference. The article talks about real decimation (up/downsampling), where you convert from one sampling rate to another. The decimator effect Adam is trying to get is different in that part, that the output sampling rate is the same as the input sampling rate.

The major problem that the decimator has, is that the step that it introduces contains frequencies above nyquist. So any prefiltering wouldn't change anything because the step process does remove the higher frequencies that a pre filter would manipulate anyway. The step process then adds back higher frequencies that are not part of the original waveform though.

Adam contacted me before he posted this, and I couldn't really help. Although I've looked into Sylenth a bit and there are some observations:
- The decimator process doesn't add any CPU, so there is no oversampling !!!
- The sound is much cleaner than the one from FS/SM, so it is quite noticable
- The decimation rate control is smooth, so they use fractional decimation

I've attached two wave images of decimation steps from Sylenth. For me it looks like the step itself is exactly the same although the decimation rate is different in the images. Maybe it's just Band-limited step mixed in?

Re: Clean Rate Reducer help

Posted: Tue Oct 28, 2014 6:02 am
by MyCo
BTW: Here's how it sounds like on a pure sine:
http://www.yedey.com/other/dec2.mp3

Re: Clean Rate Reducer help

Posted: Tue Oct 28, 2014 6:41 am
by martinvicanek
MyCo's steps look very much like miniBLEPS.

Re: Clean Rate Reducer help

Posted: Tue Oct 28, 2014 12:49 pm
by tulamide
MyCo wrote:Please don't take the wikipedia article as reference. The article talks about real decimation (up/downsampling), where you convert from one sampling rate to another. The decimator effect Adam is trying to get is different in that part, that the output sampling rate is the same as the input sampling rate.

I'm sorry then! As I said I heard the term for the first time and did a google.

A question though: If I'm working in FS with a set rate of, say, 44.1 kHz and then s&h the incoming signal, isn't that the same effect as downsampling? It stays within the 44.1 kHz range, but sends only part of the original information, just like playing a, say, 22 kHz recorded sound on a 44.1 kHz D/A without changing its pitch.

Btt, from listening, the effect is added harmonics, no partials. Or at least it sounds much like it. As if filtered after reducing, so that aliasing occurs, but the partials are filtered out. If that makes sense to you?

Re: Clean Rate Reducer help

Posted: Tue Oct 28, 2014 3:24 pm
by KG_is_back
tulamide wrote:A question though: If I'm working in FS with a set rate of, say, 44.1 kHz and then s&h the incoming signal, isn't that the same effect as downsampling? It stays within the 44.1 kHz range, but sends only part of the original information, just like playing a, say, 22 kHz recorded sound on a 44.1 kHz D/A without changing its pitch.


Yes and no... Your D/A converter regenerates a smooth curve that passes through the given sample points, so that the wave doesn't contain frequencies above Nyquist. There is exactly one curve that fits this description. If you double the sampling rate and provide each sample twice (the s&h method) your D/A will reconstruct a different wave.

Look at this example in the schematic. First graph shows a triangle wave 16samples long. Second graph shows the same wave upsampled to 32samples via s&h method. Even on this graph you can see the two waves are different. The graph plotters use linear interpolation for the curve which is different from D/A converters interpolation, but the effect is the same - When you s&h a wave and play it at the same samplerate, the result is different than downsampling the wave via s&h and playing it at lower sample rate.

Re: Clean Rate Reducer help

Posted: Wed Oct 29, 2014 1:58 am
by tulamide
KG_is_back wrote:Look at this example in the schematic. First graph shows a triangle wave 16samples long. Second graph shows the same wave upsampled to 32samples via s&h method. Even on this graph you can see the two waves are different. The graph plotters use linear interpolation for the curve which is different from D/A converters interpolation, but the effect is the same - When you s&h a wave and play it at the same samplerate, the result is different than downsampling the wave via s&h and playing it at lower sample rate.

I think I understand. Thank you, especially for the schematic. I always forget that missing information is filled by an algorithm which does not reflect the actual wave but is a fixed one (like linear, quadratic, polynomial, etc.)