3 ms·
It takes a lot of computing power to reconstruct an audio sample well. Once reconstructed it takes massive massive amounts of storage. It's all about the Shann
by aquarium87 4y ago
It takes a lot of computing power to reconstruct an audio sample well. Once reconstructed it takes massive massive amounts of storage.
It's all about the Shannon Nyquist sampling theorum.
"Strictly speaking, the theorem only applies to a class of mathematical functions having a Fourier transform that is zero outside of a finite region of frequencies. Intuitively we expect that when one reduces a continuous function to a discrete sequence and interpolates back to a continuous function, the fidelity of the result depends on the density (or sample rate) of the original samples. The sampling theorem introduces the concept of a sample rate that is sufficient for perfect fidelity for the class of functions that are band-limited to a given bandwidth, such that no actual information is lost in the sampling process. It expresses the sufficient sample rate in terms of the bandwidth for the class of functions. The theorem also leads to a formula for perfectly reconstructing the original continuous-time function from the samples." [1]
But, HOLD ON: "Practical digital-to-analog converters produce neither scaled and delayed sinc functions, nor ideal Dirac pulses. Instead they produce a piecewise-constant sequence of scaled and delayed rectangular pulses (the zero-order hold), usually followed by a lowpass filter (called an "anti-imaging filter") to remove spurious high-frequency replicas (images) of the original baseband signal." [1]
In case that was too verbose.....
"sample rate that is sufficient for perfect fidelity".... "such that no actual information is lost in the sampling process"... "theorem also leads to a formula for perfectly reconstructing the original continuous-time function from the samples"
PERFECTLY!!! Zero information loss between sampling and reconstruction. Still WTFs me to this day.
So yeah, you can feed bits to a PWM. But that not music.
[1] https://en.m.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem https://en.m.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_samp...
- Gordonjcp 4y agoThe thing is, if you design your input and output filter correctly then any sampled signal will be indistinguishable from the analogue source passed through the same set of lowpass filters. It does not take a lot of computing power, but it does take a couple of opamps.
- aquarium87 4y agoI think you misunderstand sampling theory. Sampling theory allows the sampling and recreation of ALL information, not just the 44100 samples, but datapoints in between. Sorry about the potential bad formatting, it's from a pdf. "By contrast, the waveform reconstruction process – digital-to-analogue conversion – is not so simple. In an ideal world it would be achieved by generating an impulse of appropriate amplitude for each sampling point and passing the train of regularly spaced impulses through an ideal low-pass filter with its passband upper edge set to half the sampling rate. The impulse response of such a filter is the sinc function, so each impulse would generate a sinc waveform of the necessary amplitude, and the train of sinc functions would sum to recreate the original waveform. This is illustrated in Fig 2, which shows six successive sinc functions of different amplitude and their sum (the black trace). Each sinc function contributes nothing to the summed signal amplitude at other sampling points, but does contribute to the waveform between the sampling points. It’s a common misunderstanding of sampling to suppose that the waveform between sampling points is unknowable but that is not true – provided that the input signal is bandlimited and sampled at least twice as fast as its highest component frequency, as required by the Shannon sampling process. In that case the waveform between sampling points can be reconstructed unambiguously. Importantly, the wave shape depends not just on the value of nearby samples but, ultimately, on the pattern of samples throughout the sampled signal" [1] [1] https://drive.google.com/open?id=1QhJo_Rh8sQsItFvJ1g-MnNlg9pBR6oja https://drive.google.com/open?id=1QhJo_Rh8sQsItFvJ1g-MnNlg9p... Or click the link here: https://chordelectronics.co.uk/explained-rob-watts-filter-technology-in-chord-electronics-dacs https://chordelectronics.co.uk/explained-rob-watts-filter-te...