Howdy, I have a patch attached to show how downsampling produces artifacts/distortion for a 440 sine wave. I don't hear "aliasing" and I think it couldn't be foldover at all because 440 is below the nyquist. Moreover, I hear harmonic higher pitches - so it seems like a harmonic distortion from the original sine wave that I can also still perceive. This kind of distortion happens when you have a reduced dynamic range.
Another things is that I heard someone saying how increasing sample rate improves dynamic range, but I can't find this information around. Not sure it it's really true, if someone says it is so, please send me a source, ok? But the thing is that the artifacts from this patch could be the result of a smaller SNR.
Hope you can help me sort this out.
thanks
You have a waveform with lots of little square steps in it. Those steps contain high frequencies in the same way a square wave does. Dynamic range is determined by the number of bits used to encode the signal, and the signal/noise ratio, not the sample rate.
Martin
On Fri, May 15, 2015 at 1:18 PM, Alexandre Torres Porres porres@gmail.com wrote:
Howdy, I have a patch attached to show how downsampling produces artifacts/distortion for a 440 sine wave. I don't hear "aliasing" and I think it couldn't be foldover at all because 440 is below the nyquist. Moreover, I hear harmonic higher pitches - so it seems like a harmonic distortion from the original sine wave that I can also still perceive. This kind of distortion happens when you have a reduced dynamic range.
Another things is that I heard someone saying how increasing sample rate improves dynamic range, but I can't find this information around. Not sure it it's really true, if someone says it is so, please send me a source, ok? But the thing is that the artifacts from this patch could be the result of a smaller SNR.
Hope you can help me sort this out.
thanks
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
You have a waveform with lots of little square steps in it.
And why is that? Moreover, isn't that kinda like having less bit resolution?
cheers
2015-05-15 14:51 GMT-03:00 Martin Peach chakekatzil@gmail.com:
You have a waveform with lots of little square steps in it. Those steps contain high frequencies in the same way a square wave does. Dynamic range is determined by the number of bits used to encode the signal, and the signal/noise ratio, not the sample rate.
Martin
On Fri, May 15, 2015 at 1:18 PM, Alexandre Torres Porres <porres@gmail.com
wrote:
Howdy, I have a patch attached to show how downsampling produces artifacts/distortion for a 440 sine wave. I don't hear "aliasing" and I think it couldn't be foldover at all because 440 is below the nyquist. Moreover, I hear harmonic higher pitches - so it seems like a harmonic distortion from the original sine wave that I can also still perceive. This kind of distortion happens when you have a reduced dynamic range.
Another things is that I heard someone saying how increasing sample rate improves dynamic range, but I can't find this information around. Not sure it it's really true, if someone says it is so, please send me a source, ok? But the thing is that the artifacts from this patch could be the result of a smaller SNR.
Hope you can help me sort this out.
thanks
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Alexandre
On Fri, 2015-05-15 at 14:18 -0300, Alexandre Torres Porres wrote:
Howdy, I have a patch attached to show how downsampling produces artifacts/distortion for a 440 sine wave. I don't hear "aliasing" and I think it couldn't be foldover at all because 440 is below the nyquist. Moreover, I hear harmonic higher pitches - so it seems like a harmonic distortion from the original sine wave that I can also still perceive. This kind of distortion happens when you have a reduced dynamic range.
You're on Pd-extended, right? Maybe I didn't look hard enough, but I wasn't able to find the interesting part about [inlet~] and [outlet~] in its documentation. You'll find it in vanilla, when you open the help for [outlet~], in [pd up/downsampling]. There are three different modes for up- and downsampling that you can specify as argument to [inlet~]/[outlet~]:
The default is 'hold'. In this mode, the holes are filled with the value of the previous sample. If you upsample by a factor of 8 (which is the same as when your signals comes out of a downsampled-by-factor-8 subpatch), you get 1 sample from the subpatch followed by 7 samples of the same value added by [outlet~]. You can imagine that a signal like this looks quite ragged. A slightly smoother method is 'lin'. It does linear interpolation between the samples coming from the subpatch. It still has clear artefacts, but they're not as strong as with the 'hold' method.
You can't compare the sound coming out of a downsampled subpatch to a sound played on a DAC set to a similar low samplerate. When playing a sound on a sound card advanced filtering is applied in order to get rid of aliasing effects. In your example patch, the actual samplerate conversion is causing the aliasing effects, since no "smart" filtering is used (the best you can get easily is linear interpolation). And yes, this causes artefacts that are _above_ the nyquist frequency of the lower samplerate.
Check the graph in the attached modified patch and compare hold, lin, pad.
Roman