Catena Elettroacustica · Digitale Digital Sound
CAMPIONAMENTO SAMPLING & QUANTIZATION
Campionamento · Quantizzazione · ADC · DAC Sampling · Quantization · ADC · DAC
ADC
Ogni suono è formato da una somma di sinusoidi: se riesco a rappresentare la forma d'onda risultante dalla somma di tali sinusoidi riesco poi a ricostruire il suono d'origine. An analog wave has infinite points since it is a continuous signal. We must discretize and sample this signal in order to convert it to a digital signal.
Ma con quale frequenza devo prendere i miei campioni per poter poi ricostruire il mio segnale d'origine senza perdita di informazioni? But at what frequency should I take my samples in order to then reconstruct my original signal without loss of information?
ADC
Da due punti passa una sola sinusoide. For each wave cycle, I will need at least two sample points, evenly spaced, to represent the wave in the digital domain.
ADC
Prendo in considerazione il peggiore dei casi cioè la frequenza più alta che possiamo udire: 20000 Hz e cerco di campionare quella.
Per farlo, siccome ho bisogno di prendere 2 punti dovrò prendere i campioni a una velocità doppia di tale frequenza: 40000 Hz
I consider the case where I want to be able to reproduce the highest frequency that we can hear, 20,000 Hz. What should my sampling rate be?
To do this, since I need to take 2 points per cycle, I will have to sample at twice that frequency: 40,000 Hz
Teorema del campionamento di Nyquist-Shannon, dove B è la banda del segnale che voglio campionare.
La frequenza pari alla metà della frequenza di campionamento è anche detta frequenza di Nyquist.
Nyquist-Shannon sampling theorem,where B is the bandwidth of the signal I want to sample.
The frequency equal to half the sampling frequency is also called the Nyquist frequency.
Frequenze di campionamento d'uso comune nell'audio Common sampling rates and bit depths in audio
ADC · QuantizzazioneQuantization
Ho trovato la frequenza di campionamento ma che valori posso dare ai miei campioni?
Qual'è il numero minimo di valori, il livello di precisione, che mi serve per poter poi ricostruire con precisione il mio suono originale?
I have determined the sampling frequency, but what amplitude values should I assign my samples?
How many amplitude steps do we need to sufficiently characterize an audio waveform? Quantization is the process by which we convert continuous amplitude values into discrete amplitude steps.
ADC · QuantizzazioneQuantization
Il range massimo che il nostro apparato uditivo riesce a percepire è 140dB rispetto a un riferimento 0 che è il silenzio. The maximum range that our auditory system can perceive is 140 dB relative to a reference of 0 dB, which is perceptual silence.
ADC · QuantizzazioneQuantization
In digitale si memorizzano i dati in bit cioè celle di memoria che possono assumere uno stato di 0 o di 1. Devo quindi trovare il numero di bit che mi permette di rappresentare 100-140dB.
un certo numero di bit ha un numero preciso di stati possibili, dati dal calcolo:
In digital, data is stored in bits, which can assume a state of 0 or 1. We need to determine how many bits we need to correctly represent 140 dB of dynamic range.
To calculate how many total states are possible with N bits, we compute 2N:
ADC · QuantizzazioneQuantization
In dB il raddoppio dell'ampiezza si calcola sommando 6dB perché i dB sono una scala logaritmica. In 1 bit ci sono due stati possibili: 0 oppure 1.
Se considero 0 come il silenzio e 1 come il suono posso dire che 1 è l'ampiezza doppia del mio silenzio (6dB).
Se voglio raddoppiare la quantità di stati possibili devo salire di un bit. Con 2 bit ho 4 stati possibili: posso rappresentare 12dB. Con 3 bit ho 8 stati: 18dB — etc…
In dB, doubling the amplitude results in an increase of 6 dB because decibels are on a logarithmic scale. With 1 bit there are two states: 0 or 1.
If I consider 0 as silence and 1 as sound, 1 is double the amplitude of silence (6dB).
To double the number of possible states, I increase bit depth by one. With 2 bits I have 4 states: 12dB. With 3 bits I have 8 states: 18dB — etc.
ADC · QuantizzazioneQuantization
Ad ogni bit che aumento guadagno 6dB +1 bit = a gain of 6dB in signal-to-noise ratio
DAC
Nella fase di ricostruzione del segnale analogico possiedo una serie di campioni e devo costruire quello che c'è tra un campione e l'altro. In the phase of reconstructing the analog signal, I have a digitally stored number that I need to turn back into a continuous wave. I will need to fill in the data gaps between the samples during reconstruction.
Qual'è la funzione che crea un'interpolazione tra i campioni che mi riporti in maniera fedele al suono originale? What methods can interpolate between the samples in order to faithfully bring back the original continuous sound?
Frequenze di campionamento e quantizzazioni d'uso comune nell'audio Common sampling frequencies and quantizations in audio
DAC
Nella storia si sono fatte varie prove prima di arrivare alla funzione "perfetta": Historically, various methods have been used before arriving at the most accurate function currently used:
ADC-DAC · Alias
Quando campiono a una certa frequenza di campionamento si creano delle ambiguità con i multipli della frequenza di campionamento. Queste ambiguità prendono il nome di ALIAS.
Se campiono con una freq. di campionamento molto alta il fenomeno dell'aliasing non crea grosse difficoltà a meno che non si introducano frequenze molto superiori alla freq. di Nyquist.
When I sample at a certain sampling frequency, ambiguities are created at multiples of the sampling frequency. The ambiguity can be seen in the spectral copies of the original signal — these copies are called aliases.
Generally, with an appropriate sampling rate, the aliases do not present too many problems as long as they occur at frequencies above the audible spectrum.
ADC-DAC · Foldover
Quando introduco frequenze superiori alla frequenza di Nyquist tali frequenze subiscono un "ripiegamento" detto foldover (o aliasing) dovuto alla sovrapposizione tra la parte positiva della frequenza reale con quella speculare negativa della frequenza alias. The phenomenon of aliasing starts to happen when the aliases spill over into the audible spectrum and overlap one another. The reconstructed sound is "enriched" with frequencies that are not supposed to be there. This effect is known as foldover distortion, and occurs when the sampling rate is too low, or if we try to sample sounds that exceed the Nyquist frequency.
ADC-DAC · AntialiasingAnti-aliasing