Challenge - 5 Problems
Audio Equalization Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediateOutput of applying a simple equalizer filter
Given the following Python code that applies a basic equalizer filter to an audio signal, what is the output array?
Signal Processing
import numpy as np def simple_eq(signal, gain_db): gain = 10 ** (gain_db / 20) return signal * gain input_signal = np.array([0.5, -0.5, 0.25, -0.25]) gain_db = 6 output_signal = simple_eq(input_signal, gain_db) print(np.round(output_signal, 3))
Attempts:
2 left
💡 Hint
Remember that gain in decibels converts to a linear scale using 10^(gain_db/20).
✗ Incorrect
The gain in dB is converted to a linear scale: 10^(6/20) ≈ 1.995. Multiplying the input signal by this gain scales the values accordingly. The output is rounded to three decimals.
❓ data_output
intermediateNumber of frequency bands after equalization
You have an audio equalizer that splits the frequency spectrum into bands: bass (20-250 Hz), mid (250-4000 Hz), and treble (4000-20000 Hz). If you apply a 3-band equalizer to a stereo audio signal sampled at 44100 Hz, how many equalized frequency bands will you have in total?
Attempts:
2 left
💡 Hint
Consider that stereo means two channels, each with the 3 bands.
✗ Incorrect
Each stereo channel has 3 bands, so total bands = 3 bands * 2 channels = 6 bands.
❓ visualization
advancedIdentify the correct frequency response plot of a 5-band equalizer
Which option shows the correct shape of a 5-band equalizer frequency response with bands centered at 60 Hz, 250 Hz, 1000 Hz, 4000 Hz, and 10000 Hz, each with adjustable gain?
Attempts:
2 left
💡 Hint
Equalizer bands create peaks or dips at their center frequencies.
✗ Incorrect
A 5-band equalizer shows 5 peaks or dips at the specified center frequencies, representing gain adjustments per band.
🔧 Debug
advancedIdentify the error in this equalizer filter code
What error will this Python code raise when applying a gain to an audio signal array?
```python
import numpy as np
def apply_gain(signal, gain_db):
gain = 10 ** (gain_db / 20)
return signal * gain
signal = [0.1, 0.2, 0.3]
gain_db = '5'
output = apply_gain(signal, gain_db)
print(output)
```
Signal Processing
import numpy as np def apply_gain(signal, gain_db): gain = 10 ** (gain_db / 20) return signal * gain signal = [0.1, 0.2, 0.3] gain_db = '5' output = apply_gain(signal, gain_db) print(output)
Attempts:
2 left
💡 Hint
Check the type of gain_db and the operation performed on it.
✗ Incorrect
The code tries to divide a string '5' by 20, which is not allowed, causing a TypeError.
🚀 Application
expertCalculate the output RMS after equalization
An audio signal has RMS amplitude 0.5. You apply a 10 dB gain equalizer band to it. What is the new RMS amplitude?
Attempts:
2 left
💡 Hint
Convert dB gain to linear scale: linear_gain = 10^(dB/20). Multiply RMS by linear_gain.
✗ Incorrect
10 dB gain corresponds to linear gain 10^(10/20) = 3.162. Multiply RMS 0.5 by 3.162 to get 1.58.
