1
Digital Signal Processing for Audio Applications
Big Muff Pi Tone Control DSP
School of Computing and Engineering University of West London Giulio Moro
2 CONTENTS LIST OF FIGURES .............................................................................................................................................. 3 1.
INTRODUCTION ....................................................................................................................................... 3
2.
SPECIFICATIONS ..................................................................................................................................... 3 2.1 BIG MUFF TONE CONTROL ANALOG COMPONENTS ......................................................................... 3 2 .2 BIG MUFF PI ANALOG CIRCUIT AND TRANSFER FUNCTIONS......................................................... 4 2.3 TIME CONSTANTS AND CUTOFF FREQUENCIES ................................................................................. 5
3.
FREQUENCY PRE-WARPING ................................................................................................................ 5 3.1 PRE-WARPING THE HIGH PASS CUT-OFF FREQUENCY .................................................................... 6 3.2 PRE-WARPING THE LOW PASS CUT-OFF FREQUENCY ...................................................................... 6
4.
COMBINING FILTERS IN PARALLEL ................................................................................................ 7
5.
TESTING THE ANALOG TRANSFER FUNCTION............................................................................. 8 5.1 COMPARING THE ORIGINAL AND SIMULATED BIG MUFF PI FREQUENCY RESPONSES ............ 8 5.2 FULL BASS, MID FREQUENCY AND FULL TREBLE ............................................................................ 10
6.
THE BILINEAR TRANSFORM METHOD .......................................................................................... 12 6.1 STABILITY.................................................................................................................................................. 12 6.7 APPLYING THE BILINEAR TRANSFORM............................................................................................... 13
7.
COMPARING THE RESPONSES OF THE ANALOG AND DIGITAL TRANSFER FUNCTIONS 13
8.
THE TONE CONTROL FUNCTION ..................................................................................................... 14 8.1 TESTING .................................................................................................................................................... 14 8.2 NORMALISING ALPHAS [α] BETWEEN 0 – 1 ........................................................................................ 14 8.3 ADJUSTING THE OVERALL GAIN OF THE FUNCTION OUTPUT ...................................................... 16
9.
RESULTS ................................................................................................................................................... 16
CONCLUSION .................................................................................................................................................... 17 REFERENCES .................................................................................................................................................... 19 APPENDIX .......................................................................................................................................................... 19
3 LIST OF FIGURES [1] Big Muff Pi Tone Control Schematic with Low Pass and High Pass Labelled [2] Analog Transfer Function for a High Pass Filter [3] Analog Transfer Function for a Low Pass Filter [4] Non-linear Relation Between Analog and Digital Frequency for Bilinear Transformation [5] Low Pass and High Pass Analog Filters Combined in Parallel [6] Analog Frequency Response Plotted for 0 ≤ 𝛼 ≤ 1 [7] Big Muff Pi Tone Control Frequency Response [8] Analog Frequency Response Plotted for 0 ≤ 𝛼 ≤ 1 − 0.1778 [9] Tone Control Full-Bass, Full-Treble and Mid Frequency Response [10] Analog Frequency Response (Difference Between Full Bass and α = 0.1) [11] Big Muff Pi Tone Control Frequency Response (Difference Between Full Bass and α = 0.1) [12] Analog Frequency Response When α = 0.1 becomes α = 0.1 + 0.49 [13] Analog Frequency Response When α = 0.2 becomes α = 0.2 + 0.0245 [14] Second Order IIR Digital Filter Diagram (Also Known as a Bi-quad Filter) [15] Comparison of Analog (top) and Digital (bottom) Transfer Function’s Frequency Responses [16] Full Bass Magnitude and Phase Response [17] Mid Frequency Magnitude and Phase Response [18] Full Treble Magnitude and Phase Response [19] Tone Control Response [20] Mid Frequency Response 1kHz Notch
1. INTRODUCTION This report: I.
Covers the digital implementation of the analog tone control filter circuit of the ‘Big Muff Pi’ distortion/sustain guitar pedal II. Looks at how this is achieved in MATLAB as the function: function output = bigMuffToneControl(input, potValue) where: output (stereo, matrix with two columns) is the output signal input (stereo, matrix with two columns) is the input signal potValue (scalar) is the value of the potentiometer of the tone control that mixes the low and high pass filters. A value of 0 means "potentiometer fully counterclockwise" (full-bass), a value of 1 means "knob fully clockwise" (full-treble) III. Reports on the design process, testing methodology and results
2. SPECIFICATIONS 2.1 BIG MUFF TONE CONTROL ANALOG COMPONENTS High pass • •
1 Resistance 22K: R5. 1 capacitor 4nF: C9.
Low pass
4
• •
1 Resistance 39K: R8. 1 capacitor 10nF: C8.
Output • •
Mixed together by a single linear 100K Tone potentiometer. The cut-off points are designed so that their interweaving effect introduces a middlefrequency scoop/notch at 1KHz when the potentiometer is set to the middle position [4].
2 .2 BIG MUFF PI ANALOG CIRCUIT AND TRANSFER FUNCTIONS
Figure 1. Big Muff Pi Tone Control Schematic with Low Pass and High Pass Labelled The analog transfer functions for low pass and high pass: -
VoH sRC = Vi sRC + 1 Figure 2. Analog Transfer Function for a High Pass Filter
VoL 1 = Vi sRC + 1
5
Figure 3. Analog Transfer Function for a Low Pass Filter 2.3 TIME CONSTANTS AND CUTOFF FREQUENCIES
𝜏! = 𝑅𝐶(ℎ𝑖𝑔ℎ𝑝𝑎𝑠𝑠) = 𝑅𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒(ℎ𝑖𝑔ℎ𝑝𝑎𝑠𝑠) × 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑎𝑛𝑐𝑒(ℎ𝑖𝑔ℎ𝑝𝑎𝑠𝑠) 𝜏" = 𝑅𝐶(𝑙𝑜𝑤𝑝𝑎𝑠𝑠) = 𝑅𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑙𝑜𝑤𝑝𝑎𝑠𝑠) × 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑎𝑛𝑐𝑒(𝑙𝑜𝑤𝑝𝑎𝑠𝑠 𝜏! = {22 × 10# } × {4 × 10$% } = 0.000088 seconds τ& = {39 × 10# } × {10 × 10$% } = 0.00039 seconds Therefore
!"# !%
=
&'( &'( ) *
=
And,
!", !%
=
* &'( ) *
=
&+! &+! ) * * &+" ) *
The angular cut-off frequency of each filter is given by the inverse of its time constant: -
1 1 = = 11363.63 𝑟𝑎𝑑/𝑠𝑒𝑐 𝜏! 0.000088 1 1 = = 2564.10 𝑟𝑎𝑑/𝑠𝑒𝑐 𝜏" 0.00039 The plain cut-off frequency in Hertz (Hz) is given by: 𝐹'()*++ (ℎ, 𝑙) =
1 1 = 2𝜋𝑅𝐶 2𝜋(𝜏! , 𝜏" )
1 = 1808𝐻𝑧 2 × 𝜋 × 22000 × (4 × 10$% ) 1 𝐹'()*++ (𝑙𝑝) = = 408𝐻𝑧 2 × 𝜋 × 39000 × (10 × 10$% )
𝐹'()*++ (ℎ𝑝) =
3. FREQUENCY PRE-WARPING
6 The relationship between analog frequencies (𝜔! ) and digital frequencies (𝜔" ) is non-linear [fig 4], meaning that, when we take the bilinear transform of an analog filter we need to account for the frequency warping that occurs as a result of the mapping from the s-plane to the z-plane [1].
Figure 4. Non-linear Relation Between Analog and Digital Frequency for Bilinear Transformation [7] For low pass and high pass filters, we apply pre-warping to the digital filter’s cut off frequency (𝜔" ) to obtain a pre-warped analog cut-off frequency (𝜔! ) [6].
𝜔! =
2 𝜔" 𝑇 𝑡𝑎𝑛 ( ) 𝑇 2
Figure x. Frequency Pre-warping Equation [6]
3.1 PRE-WARPING THE HIGH PASS CUT-OFF FREQUENCY
𝑤, =
2 11363.63 × 0.00002 𝑡𝑎𝑛 Q R = 11412.8 𝑟𝑎𝑑/𝑠 0.00002 2 (49 rad/s higher in digital frequency)
3.2 PRE-WARPING THE LOW PASS CUT-OFF FREQUENCY
𝑤, =
2 2564.10 × 0.00002 𝑡𝑎𝑛 Q R = 2564.66 𝑟𝑎𝑑/𝑠 0.00002 2 (0.6 rad/s higher in digital frequency)
Invert back to obtain the pre-warped time constants (𝜏# , 𝜏$ ): -
7 High pass
𝑃𝑊𝜏! =
" ""#"$.&
= 0.0000876209 𝑠𝑒𝑐𝑜𝑛𝑑𝑠 Low pass
𝑃𝑊𝜏' =
" $)*#.**
= 0.0003899152 𝑠𝑒𝑐𝑜𝑛𝑑𝑠
“Pre-warped” Value Placeholders That Give the Ideal Frequency Response: The pre-warped cut-off frequencies (𝑃𝑊𝜏# , 𝑃𝑊𝜏$ ) calculated above don’t actually give us the frequency response we expect in the digital domain, this could be due to a number of factors, which are discussed in-depth in the conclusion. Below are angular cut-off frequencies and their associated time constants that do give the ideal frequency response in the digital domain; therefore, we make use of these instead. High pass ℎ𝜔% = 13071.90 𝑟𝑎𝑑/𝑠 𝜏# = 0.0000765 Low pass 𝑙𝜔% = 3448.28 𝑟𝑎𝑑/𝑠 𝜏$ = 0.00029
4. COMBINING FILTERS IN PARALLEL
Figure 5. Low Pass and High Pass Analog Filters Combined in Parallel When the high pass and low pass filters are combined in parallel [fig 5] their transfer functions sum together [3].
8 &!"#$# &%
=
&!$# &%
+
&!"# &'
()#
+
= ()#*+ + ()$*+
Because the outputs of the individual filters are mixed together via a 100k potentiometer we require a gain term within the transfer function that represents the position of the potentiometer. For a range of 0 ≤ 𝛼 ≤ 1 where 0 is full-bass and 1 is full-treble the transfer function becomes: -
𝑉,-./. 𝑠𝜏ℎ 1 = (1 − 𝛼) +𝛼 𝑉' 𝑠𝜏ℎ + 1 𝑠𝜏𝑙 + 1
This simplifies to: -
b1 b0 b2 𝑠 (𝜏! 𝜏" 𝛼) + 𝑠(𝜏! ) + (1 − 𝛼) H(s) = 𝑠 (𝜏! 𝜏" ) + 𝑠(𝜏! + 𝜏" ) + (1) a2 a0 a1 -
We can now test the frequency response of the analog transfer function in MATLAB and make any design alterations prior to applying the bilinear transform.
5. TESTING THE ANALOG TRANSFER FUNCTION
5.1 COMPARING THE ORIGINAL AND SIMULATED BIG MUFF PI FREQUENCY RESPONSES
Figure 6. Analog Frequency Response Plotted for 0 ≤ 𝛼 ≤ 1
9 On examination of the Big Muff Pi tone control’s frequency response [fig 7], we see that the full bass and the full treble response are not entirely similar. Whilst the full-bass response resembles a typical low pass filter response, the full-treble response is more comparable to a high-shelving filter response and levels off at approximately -17.5dB.
Figure 7. Big Muff Pi Tone Control Frequency Response [4] We first observe in [fig 6] that when the tone control potentiometer goes to 1, the full treble response does not level off at 17.5dB as we expect it to in [fig 7]. We then look to approximate the range in dB between the highest value of the full bass response and the lowest value of the full treble response and see that this range is -15dB. Thus, −15𝑑𝐵 below the full bass response is where we expect the full treble response to level off. In [fig 8] this is achieved by adjusting 𝛼 (the range of the potentiometer). &'()* %, -.
123
We obtain the linear gain corresponding to −15𝑑𝐵 with 10( /0 ) = 10( /0 ) = 0.1778. Now, instead of potentiometer values 0 – 1 we take 0 – (1 − 0.1778). This adjusted range gives us the ideal full-treble response in [fig 8].
Figure 8. Analog Frequency Response Plotted for 0 ≤ 𝛼 ≤ 1 − 0.1778 Studying the maximum value of the analog full treble response [fig 7] we can see that it sits approximately 2.5dB above the maximum value of the full bass response. To reflect this in the transfer function we can boost the 𝛼 associated with the high pass gain. Ba = [th*tl*a, th, (1 - a)]; Aa = [th*tl, (th + tl), 1];
10
Multiplying this 𝛼 by 1.65 boosts the gain of the full treble curve by approximately 2.5dB to reflect the original analog frequency response [fig 7] Ba = [th*tl*a*1.65, th, (1 - a)]; Aa = [th*tl, (th + tl), 1];
5.2 FULL BASS, MID FREQUENCY AND FULL TREBLE Midpoint scoop @ 1kHz 2.5dB difference between full bass and full treble
Full Bass
---------------------------------------------------Mid Frequency
-15dB range
Full Treble
Figure 9. Tone Control Full-Bass, Full-Treble and Mid Frequency Response It makes sense that these values alphas α = [0:0.1:1-0.1788] make for a better approximation of the original frequency response. As we can see, the original frequency response [fig 7] has only nine response curves, whereas evaluating between 0 – 1 yield eleven responses. Now that the full treble, full bass and mid frequency are in the right place, we try plotting our new range with equally spaced intermediate values: alphas = [0:0.1:1-0.1788]; We obtain [fig 10] which is compared below with [fig 11]. The first disparity we observe pertains to the response belonging to α = 0.1. We observe that, in our approximation, the minimum value of the α = 0.1 curve sits approximately 16.5dB below the maximum value of the full bass curve, whereas in the original response [fig 11] the corresponding α = 0.1 response sits 14dB below the maximum value of the full bass. Comparing the two images side-by-side, it seems that the difference between the max values of α = 0.0 and α = 0.1 appears considerable when compared to the spacing of the other responses. We hypothesise that the responses detailed in [fig 11] are not as equally spaced as we originally assumed. We try experimentally increasing α = 0.1 to see if this brings the response closer to the original.
11
-------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------Figure 10. Analog Frequency Response (Difference in dB Between Full Bass and α = 0.1)
---------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
Figure 11. Big Muff Pi Tone Control Frequency Response (Difference Between Full Bass and α = 0.1) [4] We see in [fig 12] that α = 0.1+0.49 takes us a lot closer to the original response of [fig 11] but we also observe that now the responses α = 0.1+0.49 and α = 0.2 are closer than they appear in the original response.
Figure 12. Analog Frequency Response When α = 0.1 becomes α = 0.1 + 0.49 By looking at the original response we can assume what we want to do here is achieve a value for α = 0.2 that sits equidistant between α = 0.1 + 0.49 and α = 0.3. To achieve this, we take 2.+45 * 2.7 the mean W X = 0.2245, so we replace α = 0.2 with α = 0.2 + 0.0245 and run the 8 test again.
12
Figure 13. Analog Frequency Response When α = 0.2 becomes α = 0.2 + 0.0245 Now we have a frequency response that closely resembles the original Big Muff Pi Tone Control frequency response of [fig 7]. The values of alpha (α) used to achieve this plot are: [0.0, 0.149, 0.2245, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8222] Where: •
0.0 = Full bass
•
0.4 = Mid frequency
•
0.8222 = Full treble
The analog transfer function of the low pass and high pass in parallel with gain factor (after adjustment) is: -
b0 b1 b2 𝑠 - (𝜏! 𝜏" 𝛼 ∗ 1.65) + 𝑠(𝜏! ) + (1 − 𝛼) H(s) = 𝑠 - (𝜏! 𝜏" ) + 𝑠(𝜏! + 𝜏" ) + (1) a2 a0 a1
6. THE BILINEAR TRANSFORM METHOD
6.1 STABILITY The bilinear transform method preserves stability in the way that it maps between the s-plane and the z-plane. Values of s on the imaginary (𝑗𝜔) axis in the s-plane, map to the unit circle in the z-plane [2]. The s-plane (𝑗𝜔) axis wraps exactly once around the unit circle in the z-plane, with 𝑠 = 0 mapping to 𝑧 = 1 and 𝑠 = ∞ mapping to 𝑧 = −1. Values for s on the left side of the s-plane map to
13 corresponding points within the unit circle thus preserving stability [7]. Another property of the bilinear transform is that the order of the filter is preserved, therefore when applying the transform to an analog second order IIR transfer function we expect to obtain a digital second order IIR transfer function [5]. 6.7 APPLYING THE BILINEAR TRANSFORM Given the analog transfer function for a second order IIR filter (the highest power of s = 2) we 8 perform the bilinear transform by substituting 𝑠 for 4/ 512 and 𝑠 8 for \4/ 512 ] , to give: 562 562 -
H(z) =
- 0$1 [ (Z.- 0$1 021 𝜏! 𝜏" 𝛼 ∗ 1.65) + (. 021 𝜏! ) + (1 − 𝛼) -
(𝜏 + 𝜏" )) + (1) (Z.- 0$1 [ 𝜏! 𝜏" ) + (.- 0$1 021 021 !
This simplifies to: -
b0
b1
b3
𝑿(𝒛) (𝜏! 𝜏" 6.6𝛼 + 𝜏! 2𝑇 + 𝑇 # − 𝑇 # 𝛼) + (2𝑇 # − 2𝑇 # 𝛼 − 𝜏! 𝜏" 13.2𝛼) 𝐳 $𝟏 + (𝜏! 𝜏" 6.6𝛼 − 𝜏! 2𝑇 + 𝑇 # − 𝑇 # 𝛼) 𝐳 $𝟐 𝑯(𝒛) = = (2𝑇𝜏! + 2𝑇𝜏" + 𝑇 # + 𝜏! 𝜏" 4) + (𝑇 # 2 − 𝜏! 𝜏" 8) 𝐳 $𝟏 + (𝜏! 𝜏" 4 − 2𝑇𝜏! + 2𝑇𝜏" + 𝑇 # ) 𝐳 $𝟐 𝒀(𝒛)
a0
a1
a2
For full bilinear transform working, see [Appendix, I].
Figure 14. Second Order IIR Digital Filter Diagram (Also Known as a Bi-quad Filter)
7. COMPARING THE RESPONSES OF THE ANALOG AND DIGITAL TRANSFER FUNCTIONS
14
Figure 15. Comparison of Analog (top) and Digital (bottom) Transfer Function’s Frequency Responses We can see in [fig 15] that, after applying the bilinear transform, the digital transfer function we obtain gives an identical frequency response.
8. THE TONE CONTROL FUNCTION Because the filter’s associated transfer function is already the low pass and high pass placed in parallel, with gain factor (𝛼), the only arguments our bigMuffToneControl() function requires are, (input, potValue). The argument input is the input signal to be filtered and potValue is the value of the potentiometer (𝛼) between 0 – 1 where 0 is full bass and 1 is full treble. 8.1 TESTING The testing code comprises of a for loop that iterates through predetermined values of alpha (𝛼). This testing allows us to evaluate the frequency response that the output of the function gives for individual values of alpha (𝛼) and assess whether they are synonymous with the responses of the filter we designed in the analog domain. For each value of 𝛼, a magnitude and phase response are plotted. Here freqz() is used to return the frequency response vector [X, ] associated with the output of bigMuffToneControl(). For plotting the magnitude response, abs(X)is plotted against a frequency axis, and for the phase response angle(X) is plotted against the same frequency axis. 8.2 NORMALISING ALPHAS [α] BETWEEN 0 – 1 Ideally, we would like to normalise our potValue argument to take values between 0 – 1 as this is a model fixed range between full bass and full treble that users can enter [8]. Having made adjustments
15 to alpha (𝛼) earlier to achieve the desired frequency response, before applying the bilinear transform, our task now is to scale alphas: alphas = [0.0, 0.145, 0.23, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8222] to represent values between 0 – 1. The first line of bigMuffToneControl() introduces a conditional if statement that immediately throws an error if a user tries to enter a value that is less than 0 or greater than 1. This prevents users calling the function with values outside of the potentiometer’s range. Next, another succession of if statements manually “scale” the range of alpha so that 0.0 is the beginning of the potentiometer’s range (fully counterclockwise [0.0]), where 0.8222 is the end of the potentiometer’s range (fully clockwise [1.0]) and 0.4 is the (central position [0.5]) of the potentiometer. This appears the simplest way to allow users to enter a common range [8] that upholds the specific values of 𝛼 that support our design, although the shortcomings of this manual scaling method will be discussed in the conclusion. if potValue < 0 || potValue > 1 msg = 'expected value between 0 and 1'; error(msg) end a = round(potValue, 1); if a == 0.1 a = 0.145; end if a == 0.2 a = 0.23; end if a == 0.3 a = 0.29; end if a == 0.4 a = 0.345; end if a == 0.5 a = 0.4; end if a == 0.6 a = 0.475; end if a == 0.7 a = 0.55; end if a == 0.8 a = 0.625; end if a == 0.9 a = 0.72; end if a == 1 a = 0.8222; end
16 8.3 ADJUSTING THE OVERALL GAIN OF THE FUNCTION OUTPUT In the original frequency response [fig 7] the full range goes from 0 – 17.5𝑑𝐵. At the moment our range goes between 2.5𝑑𝐵 – 15𝑑𝐵. Although they both have a 17.5dB range we’re going to want to shift the overall response down by 2.5dB so that we are affecting the correct values in decibels (dB). The way we do this is to multiply the output of the filter by a scalar. To find out what this will be in 1/.3 linear gain we apply 10 /0 . To be exact, our maximum gain (full treble) sits at 2.65dB so we use this 1/.83 10 /0 to get: gainShift = 10^(-2.65/20); %converts a dB shift of -2.65 to linear gain output = output * gainShift;
9. RESULTS In this section we will look at the results obtained from the output of bigMuffToneControl() for various values of 𝛼. We test with an impulse signal in order to obtain a revealing frequency response showing exactly how the gain of the input is affected for various positions of the 100k potentiometer (𝛼).
Figure 16. Full Bass Response
Figure 18. Full Treble Response
Figure 17. Mid Frequency Response
Figure 19. Tone Control Response
We observe in [fig 18] that the full treble response sits between 0 − 17.5𝑑𝐵, this is synonymous with the range of the original full treble response [fig 7].
17
The full bass response [fig 16] begins at 2.5dB and follows the same low pass slope that we expect from [fig 7]. This response also correctly intersects the full treble response at 1kHz seen in [fig 19]. Taking a closer look at the mid frequency response we can see that indeed we do not obtain a flat frequency response [4]; in [fig 20] we observe a ballpark figure of the specified 7dB loss at the notch (ours is closer to 8dB loss).
-----------------------------------------------------
Figure 20. Mid Frequency Response 1kHz Notch
CONCLUSION In conclusion, this project has been successful in achieving results in the digital domain that are extremely close, if not identical to, the original analog tone control and its associated frequency response. However, it’s important to discuss some of the trade-offs that were made to obtain these results. The main trade-off pertains to the potValue values (𝛼). In order to honour the precise values for (𝛼) specified during the analog filter design process, the argument potValue is rounded to the nearest one decimal place and then (somewhat experimentally) scaled to adhere to the desired range and intermediary values. The discrepancy here is that this rounding produces a non-continuous knob. Instead, this produces a dial capable of only representing a limited number of increments. This could be misleading to a user if they wanted to enter a specific value between 0 − 1 that exceeds one decimal place, as the function will allow the input but will immediately round it. For whatever reason, via pre-warping, we didn’t seem to generate cut-off frequencies that were substantially closer to that of our ideal design. What is meant by this, is that if we observe our original analog frequency response [fig 7] we want the junction of the full bass and the full treble response and the notch of the mid frequency to sit at 1kHz.
18 In [fig 6] when we originally test the analog transfer function of the low and high pass in parallel in MATLAB the points we are expecting to see at 1kHz are sitting around 850Hz. We hypothesise that this discrepancy may be partly attributable to frequency warping and consequently proceed to apply the frequency pre-warping to the time constants (𝜏# , 𝜏$ ) (see full working in sections [3.1] [3.2]). However, the pre-warped values we obtained didn’t take us much closer to our ideal frequency response. It’s unclear whether this is due to some miscalculation of the cut-off frequency or the fact that the non-linearity of analog and digital frequencies is less apparent the further the frequency is from Nyquist [7]. Either way, we attempt to correct this experimentally by testing values for (𝜏# , 𝜏$ ) until a frequency response with the desired characteristics (junction of the full bass and the full treble response and the notch of the mid frequency response @ 1kHz) is achieved. These values are: th = 0.0000765; %high pass time constant tl = 0.00029; %low pass time constant
19 REFERENCES [1] Kundu, S., 2010. Analog and Digital Communications. New Delhi, India: Dorling Kinderslp.139. [2] Winder, S., 2002. Analog and Digital Filter Design. Amsterdam: Newnes, pp.397 - 400. [3] Smith, J., 2008. Introduction to Digital Filters. Stanford, Calif.: Stanford Univ., pp. Series and Parallel Transfer Functions. [4] Electrosmash.com. 2020. Electrosmash - Big Muff Pi Analysis. [online] Available at: <https://www.electrosmash.com/big-muff-pi-analysis> [Accessed 13 June 2020]. [5] Smith, J., 2011. Physical Audio Signal Processing. [Lexington]: W3K Publishing, p. bilinear transform. [6] Pirkle, W., 2019. Designing Audio Effect Plugins in C++: For AAX, AU, And VST3 With DSP Theory. 2nd ed. New York: Routledge, p.266. [7] Carvalho, J., Candeia Gurjão, E., Ribeiro Veloso, L. and Miranda Regis, C., 2018. Digital Signal Processing. New York: Momentum Press, p.92. [8] Bjørn, K. and Jarre, J., 2017. Push Turn Move. Denmark: Bjooks, pp.62-63.
APPENDIX I. -
H(z) =
- 0$1 [ (Z.- 0$1 021 𝜏! 𝜏" 𝛼 ∗ 1.65) + (. 021 𝜏! ) + (1 − 𝛼) -
(𝜏 + 𝜏" )) + (1) (Z.- 0$1 [ 𝜏! 𝜏" ) + (.- 0$1 021 021 !
Multiply by 𝑇 -
=
0$1 [ [ (4Z 0$1 021 𝜏! 𝜏" 𝛼 ∗ 1.65) + (2𝑇Z 021 𝜏! ) + ((1 − 𝛼) (𝑇 )) -
(4Z0$1 [ 𝜏! 𝜏" ) + (2𝑇Z 0$1 [(𝜏! + 𝜏" )) + (𝑇 - ) 021 021
Multiply by (𝑧 + 1)(4(𝑧 − 1)- 𝜏! 𝜏" 𝛼 ∗ 1.65) + (2𝑇(𝑧 − 1)(𝑧 + 1) 𝜏! ) + ((𝑧 + 1)- (𝑇 - )(1 − 𝛼) ) = (4(𝑧 − 1)- 𝜏! 𝜏" ) + (2𝑇(𝑧 − 1)(𝑧 + 1)(𝜏! + 𝜏" )) + ((𝑧 + 1)- (𝑇)- ) Expand the brackets (4(𝑧 - − 2𝑧 + 1)𝜏! 𝜏" 𝛼) + (2𝑇(𝑧 - − 1) 𝜏! ) + ((𝑧 - + 2𝑧 + 1)(𝑇 - )(1 − 𝛼) ) = (4(𝑧 - − 2𝑧 + 1)𝜏! 𝜏" ) + (2𝑇(𝑧 - − 1)(𝜏! + 𝜏" )) + ((𝑧 - + 2𝑧 + 1)(𝑇)- ) Multiply out the brackets =
𝜏! 𝜏" 𝛼6.6𝑧 - − 𝜏! 𝜏" 𝛼13.2𝑧 + 𝜏! 𝜏" 𝛼6.6 + ( 𝜏! 2𝑇𝑧 - − 𝜏! 2𝑇) + (𝑇 - 𝑧 - + 𝑇 - 2𝑧 + 𝑇 - )(1 − 𝛼) 𝜏! 𝜏" 4𝑧 - − 𝜏! 𝜏" 8𝑧 + 𝜏! 𝜏" 4 + (𝜏! + 𝜏" )2𝑇𝑧 - − (𝜏! + 𝜏" )2𝑇) + (𝑇 - 𝑧 - + 𝑇 - 2𝑧 + 𝑇 - )
20
Arrange like terms 𝜏! 𝜏" 𝛼6.6𝑧 # + 𝜏! 2𝑇𝑧 # + 𝑇 # 𝑧 # − 𝑎𝑇 # 𝑧 # + 2𝑇 # 𝑧 − 2𝛼𝑇 # 𝑧 − 𝜏! 𝜏" 𝛼13.2𝑧 + 𝜏! 𝜏" 𝛼6.6 − 𝜏! 2𝑇 + 𝑇 # − 𝛼𝑇 # (𝜏! + 𝜏" )2𝑇𝑧 # + 𝑇 # 𝑧 # + 𝜏! 𝜏" 4𝑧 # + 𝑇 # 2𝑧 − 𝜏! 𝜏" 8𝑧 + 𝜏! 𝜏" 4 − (𝜏! + 𝜏" )2𝑇 + 𝑇 #
Factor the powers of z (𝜏# 𝜏$ 6.6𝛼 + 𝜏# 2𝑇 + 𝑇 8 − 𝑇 8 𝛼) 𝐳 𝟐 + (2𝑇 8 − 2𝑇 8 𝛼 − 𝜏# 𝜏$ 13.2𝛼) 𝐳 + (𝜏# 𝜏$ 6.6𝛼 − 𝜏# 2𝑇 + 𝑇 8 − 𝑇 8 𝛼) 8(𝜏# + 𝜏$ )2𝑇 + 𝑇 8 + 𝜏# 𝜏$ 4: 𝐳 𝟐 + (𝑇 8 2 − 𝜏# 𝜏$ 8) 𝐳 + (𝜏# 𝜏$ 4 − (𝜏# + 𝜏$ )2𝑇 + 𝑇 8 ) Divide numerator and denominator by 𝑧 8 , alternatively multiply by 𝑧 :8 (𝜏! 𝜏" 6.6𝛼 + 𝜏! 2𝑇 + 𝑇 # − 𝑇 # 𝛼) 𝟏 + (2𝑇 # − 2𝑇 # 𝛼 − 𝜏! 𝜏" 13.2𝛼) 𝐳 $𝟏 + (𝜏! 𝜏" 6.6𝛼 − 𝜏! 2𝑇 + 𝑇 # − 𝑇 # 𝛼) 𝐳 $𝟐 6(𝜏! + 𝜏" )2𝑇 + 𝑇 # + 𝜏! 𝜏" 47 𝟏 + (𝑇 # 2 − 𝜏! 𝜏" 8) 𝐳 $𝟏 + (𝜏! 𝜏" 4 − (𝜏! + 𝜏" )2𝑇 + 𝑇 # ) 𝐳 $𝟐