Q1: Given that the pitch of a middle C note played with a flute is 261 Hz. What are the pitches of the other C notes played with the same flute? What do you expect the pitches of the D notes played with the same flute?
The distance between any 2 musical half-steps is equal to the 12th root of 2 (122 ≈1.0595 = r).
There are 12 musical half-steps in one musical octave.
Freq. of a note xr = Freq. of the next half-step
Freq. of a note xr12 = Freq. of a note which is 1 octave higher
To find the pitches on the same note, simply multiply/divide by 2.
The pitches the C notes played with the same flute are:
32.625, 62.25, 130.5, 261, 522, 1944, 2088, 4176 and 8352 Hz.
Note D is 2 half-steps above Note C.
pitch of D = pitch of C×r×r=C×122×122=C×2121×2121
Pitches of D notes played with the same flute are:
36.62, 73.24, 146.48, 292.96, 585.93, 1171.9, 2343.7, 4687.4, 9374.8 Hz.
Q2: If we add 2 identical sounds together, what will be the increase in DB?
It is a constructive addition, so the Amplitude ratio is 2 to 1.
Q3: What is the relation between loudness and sound pressure level in decibels? Is 80 dB twice as loud as 40 dB? How do you translate from decibels to loudness?
Sound level in dB is a physical quantity and may be measured objectively.
Loudness is a perceived quantity and one can only obtain measurements of it by asking people questions about loudness or relative loudness. (Different people have different answers)
Relating the two is called psychophysics. Psychophysics experiments show that subjects report a doubling of loudness for each increase in sound level of approximately 10dB.
(So roughly speaking, 50dB is twice as loud as 40dB, 60 dB is twice as loud as 50dB, etc.)
Since 80dB is 40dB more than 40dB, 80dB is roughly 2x2x2x2 = 16 times as loud as 40 dB.
To see whether they are identical, find the Tranfer functions of them.
Define special variable for easy caluclation.
For 1a:
R=X+(−Yz−1)=X−Yz−1
S=R+Sz−1
S(1−z−1)=R
S=1−z−1R
Y=S+N
Y=N+1−z−1X−Yz−1
(1−z−1)Y=(1−z−1)N+X−Yz−1
(1−z−1)Y+Yz−1=(1−z−1)N+X
Y=(1−z−1)N+X=X+N(H1(z))
For 1b:
Y=A+N
A=X−(Y−A)z−1
A=X−Yz−1+Az−1
(1−z−1)A=X−Yz−1
A=1−z−1X−Yz−1
Y=N+1−z−1X−Yz−1
(1−z−1)Y=(1−z−1)N+X−Yz−1
(1−z−1)Y+Yz−1=(1−z−1)N+X
Y=(1−z−1)N+X=X+N(H1(z))
Q2(i): Dervice the output sequence.
Keep write down the input, output and error signal until error signal has become 0.
Q2(ii): Is the output a periodic pattern sequence? What is the period of the sequence if it is?
It repeats pattern “01010”. The period is 5.
Q2(iii): What is the problem with a periodic output? Suggest a solution to solve this problem.
A constant level input results in a regular output pattern. If the period of the repetition of such patterns is long enough, they may be audible as a deterministic or oscillatory tone, rather than as noise.
Solution: Dithering the input fed into the quantizer as follows.
Q3(i): Give the transfer function of the filter in z domain.
Transfer function=H(z)=X(z)Y(z)
Just do change to Z domain, then do a change of subject.
Q3(ii): Determine the zero(s) and pole(s) of the filter (if there is any).
Zeros = root of (Y(z)=0)
Poles = root of (X(z)=0)
in this case,
Zeros: z1=−21⊣j23,z2=−21−j23
Poles: z=0
Q3(iii): Is it a FIR?
If Pole = 0, it is a FIR. Otherwise it is IIR.
In this case, Pole = 0, therefore it is a FIR.
Q3(iv): Determine the frequency response of the filter.
Power frequency response:
P(ω=∣∣H(ejω)∣∣2=H(z)H(z1)∣∣z=ejω
Special thing to remember:
zn+z−n=2cos(nω)
Therefore:
3z2z2+z1+1×3z−2z−2+z−1+1
=91+z1+z2+z−1+1+z1+z−2+z−1+1
=93+2z1+2z−1+z2+z−2
=93+4cos(ω)+2cos(2ω)
=31+94cos(ω)+92cos(2ω)
Q3(v): Sketch the frequency response of the filter.
Just use the frequency response formula and put ω as 0, 2π, 32π and π
∣P(0)∣=93+4+2=1
∣P(2π)∣=93+0−2=91
∣P(32π)∣=93−2−1=0
∣P(π)∣=93−4+2=91
So you can plot it out. This is the Frequency response (Power).
Or taking square root:
∣H(0)∣=1
∣H(2π)∣=31
∣H(32π)∣=0
∣H(π)∣=31
Then you can plot it out. This is the Frequency response (Amplitude).
Q3(vi): Based on (v), determine if the filter is an LPF, HPF or BPF.
LF > HF = Lowpass Filter
HF > LF = Highpass Filter
BF > HF and LF = Bandpass Filter
In this case it is LPF.
Q3(vii): Implement the filter.
Tuto 8
Q1: A perceptual audio codec is used to compress an audio signal. The codec groups every 4 barks into a subband and then allocates bits to different subbands according to the result of a spectrum analysis based on a psychoacoustic model. All samples in the same subband are quantized with the same quantizer, and the bit resolution of which is allocated by the codec. (The Bark scale is a psychoacoustical scale proposed by Eberhard Zwicker in 1961.)
Q1(i) Locate the potential maskers.
Potential maskers are all the audiable local maximum.
Blue ovals are also local maximum but they are not hearable, therefore they are not potential maskers.
Red ovals are the potential maskers.
Positions of 7 potential maskers: bark 7, 11, 14, 15, 18, 21 and 23.
Q1(ii) Based on the given psychoacoustic model, derive the masking threshold.
The psychoacoustic model define how will the maskers (the Arrow) mask. (Masking Curve Derivation)
For example (not match with the question)
Then we use blue color to incidate the non-audiable sounds.
In this question, we were given such psy. Model.
Fig. 1b is the psychoacoustic model. Apply the mask on each maskers.
Q1(iii) Determine the Signal-to-Mask levels of each subband.
SMR in each subband = Highest - Lowest Mask
Subband 1: 0 dB
Subband 2: 45 - 18 = 27 dB
Subband 3: 0 dB
Subband 4: 60 - 35 = 25 dB
Subband 5: 50 - 42 = 8 dB
Subband 6: 85 - 50 = 35 dB
Subband 7: 0 dB
Subband 8: 0 dB
Q1(iv) Suppose allocating one additional bit to a subband results in a 6dB drop of the noise floor in that subband. Allocate an appropriate number of bits to all subbands.