On 18/08/2015, Ethan Duni <ethan.d...@gmail.com> wrote: >>Assume you have a Nyquist frequency square wave: 1, -1, 1, -1, 1, -1, 1, > -1... > > The sampling theorem requires that all frequencies be *below* the Nyquist > frequency. Sampling signals at exactly the Nyquist frequency is an edge > case that sort-of works in some limited special cases, but there is no > expectation that digital processing of such a signal is going to work > properly in general.
Not necessarily, at least in theory. In practice, an anti-alias filter will filter out a signal exactly at Nyquist freq, both when sampling it (A/D conversion), and both when reconstructing it (D/A conversion). But that doesn't mean that a half-sample delay doesn't have -Inf dB gain at Nyquist frequency. It's another thing that the anti-alias filter of a converter will typically filter it out anyways when reconstructing - but we weren't talking about reconstruction, so that is irrelevant here. A Nyquist frequency signal (1, -1, 1, -1, ...) is a perfectly valid bandlimited signal. > But even given that, the interpolator outputting the zero signal in that > case is exactly correct. That's what you would have gotten if you'd sampled > the same sine wave (*not* square wave - that would imply frequencies above > Nyquist) with a half-sample offset from the 1, -1, 1, -1, ... case. More precisely: a bandlimited Nyquist frequency square wave *equals* a Nyquist frequency sine wave. Or any other harmonic waveform for that matter (triangle, saw, etc.) In all cases, only the fundamental partial is there (1, -1, 1, -1, ... = Nyquist frequency sine), all the other partials are filtered out from the bandlimiting. So the signal 1, -1, 1, -1, *is* a Nyquist frequency bandlimited square wave, and also a sine-wave as well. They're identical. It *is* a bandlimited square wave - that's what you get when you take a Nyquist frequency square wave, and bandlimit it by removing all partials above Nyquist freq (say, via DFT). You may call it a square, a sine, saw, doesn't matter - when bandlimited, they're identical. > The > incorrect behavior arises when you try to go in the other direction (i.e., > apply a second half-sample delay), and you still get only DC. What would be "incorrect" about it? I'm not sure what is your assumption. Of course if you apply any kind of filtering to a zero DC signal, you'll still have a zero DC signal. -Inf + -Inf = -Inf... Not sure what you're trying to achieve by "applying a second half-sample delay"... That also has -Inf dB gain at Nyquist, so you'll still have a zero DC signal after that. Since a half-sample delay has -Inf gain at Nyquist, you cannot "undo" it by applying another half-sample delay... > But, again, that doesn't really say anything about interpolation.It just > says that you sampled the signal improperly in the first place, and so > digital processing can't be relied upon to work appropriately. That's false. 1, -1, 1, -1, 1, -1 ... is a proper bandlimited signal, and contains no aliasing. That's the maximal allowed frequency without any aliasing. It is a bandlimited Nyquist frequency square wave (which is equivalent to a Nyquist frequency sine wave). From that, you can reconstruct a perfect alias-free sinusoid of frequency SR/2. What's causing you to be unable to reconstruct the waveform? -P _______________________________________________ music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp