AndreasN wrote on Thu, 01 December 2005 23:30 |
Hi!
Made a picture to show where the inter-sample phase information is lurking.
The rising wavefront is a drum attack, chopped off before the real attack begins at all. Taking only the very first tiny little beginning of the wave in consideration. The end is suddenly gated, leaving a half cycle pulse. Upper picture is 44kHz, lower is a resampling of this to 192. The time grid lines are set at one millisec.
The three lumps of sound was first edited in 192khz. The last two pulses being offset 2 and 6 samples forward. Resampling this to 44kHz gives sub-sample offsets on the transients. Is this what you're looking for? Notice how all the peaks look different. Still, they represent the exact same waveform, at different phase relationship in regards to the sample dots.
Quadrupling the number of dots in the second picture gives a more comforting picture. The wave is still the same, with new offsets in regard to the 192kHz dots. Going to 960000kHz would give very accurate visual representation, as a digital oscilloscope does. Better editing too, btw, in lack of sub-sample edits, but the 22kHz limited waveform would be the same all the time.
Hope this may help someone out there. The issue sure used to confused me!
|
You issue is still confusing you.
The reason the pictures look different is simple: You are violating Nyquist. A sudden change in the input voltage wave means having high frequency content. The ear does not react to the high frequency energy due to sudden changes, above a certain frequency (be it 20KHz or what not). We can and need to agree on some reasonable bandwidth (per application, such as audio, video, instrumentation...). Once we know the bandwidth, it is our responsibility to sample faster then twice the bandwidth. Differently stated - we need to make sure that our AD does not process signals above half the sample rate. We often use a filter to remove energy above Nyquist. Note that modern AD's have Nyquist at the MHZ range, making the filtering easier.
At the DA side, one needs a similar anti imaging filter to ensure proper conversion from digital to analog.
Try to redo what you did with proper filtering prior to the AD process, and after the DA, and the pictures will all look the same. Alternativly, go to
www.lavryengineering.com then to Forums, then to Tutorials, and look at the paper "Sampling Theory" for some more detailed explanation.
A wave form that has been properly sampled (allow low pass energy below Nyquist, reject energy above Nyquist), and properly reconstructed (again, allow low pass energy below Nyquist, reject energy above Nyquist) will look THE SAME. You can increase the sampling frequency all you want and it will make ZERO DIFFERANCE.
That is the whole concept behind digital representation of analog. We can not represent ANY ANALOG by digital means, that would take infinite points... But we can represent a RESTRICTED analog signal with digital signals,. We obey Nyquist, and the representation is ERROR FREE. It is not an aproximation with an error, it is PERFECTION.
The real world deviations from perfections are due to imperfect filters, jitter and other practical sources of error, but they are very small. Certainly an 8-10 bit simulation is far better then a time domain picture on a scope (which is roughly a 1% instrument...)
Also, note that it is not a simple matter to simulate such things on a computer. The computer does not Handel continues analog waves. The computer itself takes the analog signal and makes it into data point. In my tutorials, I start by approximating the analog as a signal by oversampling it by a large factor, then I get an approximate result, good enough for visualizing scope like pictures...
How many "dots" does one need to show a digitized 44.1KHz signal? You need 44100 dots per second. How many "dots" does one need to show an analog signal? It depending on screen resolution, but figure on a huge factor. Viewing an "analog signal" on a computer does require filling the "in between" to a resolution "good enough" for the eye. A crude computer modeling of analog amounts to violation of Nyquist, before you even began the analysis. So take care in with you do, when presenting analog on a computer...
Regards
Dan Lavry
www.lavruengineering.com