Holmimpulse User Guide: Document Version 0.0.8 (October 23, 2009) Compatible Holmimpulse Versions 1.4.X.X
Holmimpulse User Guide: Document Version 0.0.8 (October 23, 2009) Compatible Holmimpulse Versions 1.4.X.X
Contents
Contents i
1 Introduction 1
1.0.1 HOLMImpulse and DSPreLab? . . . . . . . . . . . . . . . . . . . . 1
1.0.2 HOLMImpulse @ diyAudio.com . . . . . . . . . . . . . . . . . . . . 1
3 Exporting a Response 7
3.1 Text-file options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Exporting the Frequency Response . . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Exporting the Impulse Response . . . . . . . . . . . . . . . . . . . . . . . . 9
4 Importing a response 11
4.1 Importing a frequency response . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Importing a impulse response . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3 Importing a Signal & Recording pair . . . . . . . . . . . . . . . . . . . . . . 12
5 Measurement Options 13
5.1 Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.2 Time zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2.1 Auto detect time-zero . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Time-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.4 Frequency response - Amplitude Smoothing . . . . . . . . . . . . . . . . . . 18
5.5 Frequency response - Frequency dependent time-window. . . . . . . . . . . . 19
5.6 Highpass and Lowpass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6 Manipulation 22
6.1 Frequency domain arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . 22
A Mathematics 24
A.1 Definitions and Fourier transforms . . . . . . . . . . . . . . . . . . . . . . . 24
A.2 Filtering in the frequency domain . . . . . . . . . . . . . . . . . . . . . . . . 26
A.2.1 Constant time-window . . . . . . . . . . . . . . . . . . . . . . . . . . 26
A.2.1.1 Example: Hann window . . . . . . . . . . . . . . . . . . . . 27
A.2.1.2 Example: Blackman window . . . . . . . . . . . . . . . . . 27
A.2.1.3 Example: Gaussian smoothing - time window . . . . . . . . 28
A.3 1/N Octave Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A.3.1 The intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A.3.2 Complex smoothing of discrete frequency values . . . . . . . . . . . . 29
A.3.2.1 Filter shape . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
A.3.2.2 Time-windowing . . . . . . . . . . . . . . . . . . . . . . . . 30
A.3.2.3 Visualizing with graphs . . . . . . . . . . . . . . . . . . . . 31
A.3.3 Absolute smoothing of discrete frequency values . . . . . . . . . . . . 32
Index 33
Chapter 1
Introduction
• Measure Impulse-response
• Measure Phase-response
• Measure Frequency-response
• Measure Harmonic distortion (THD)
• Make bandwidth limited measurements with no phase-errors
• Compare measurements
• Import Frequency- & Impulse-response
• Export Frequency- & Impulse-response
• Using open format for saved files (zip, wav/flac, txt)
Chapter 2
The frequency and impulse response graphs are the cornerstone in HOLMImpulse. There
are several tips and tricks for changing the visualization of these graphs. This chapter will
also reveal some very nice features when dealing with these graphs.
2.3.2 ’Auto Zoom’ & ’Zoom Out’ for the Impulse Response
The ’Auto Zoom’ and the ’Zoom Out’ button in the lower left corner will adjust the ranges
for the shown impulse response(s)
When you have zoomed in you can zoom in again, and right-clicking will the follow your
zoom history back.
The ’Reverberation’ button will enable the dB-scale and adjust the range so that the
reverberation is shown:
Chapter 3
Exporting a Response
• Information header in file is a comment section in the top of the text-file, where the
comment start character(s) can be configured
• The column separator is the character which is used to separate to columns
• The decimal separator is a . (Dot) or a , (Comma) such that eg.
π = 3.1416 . . . or π = 3, 1416 . . .
Note: The text-file options are remembered - also after a restart of the application
1. Find the measurement, which you want to export and click the ’Export’ button
2. Select file-name (Browse) and verify settings in the Frequency tab
3. Click the ’Export Frequency Response’ button
Note: The frequency export options are remembered - also after a restart of the application
1. Find the measurement, which you want to export and click the ’Export’ button
2. Select file-name (Browse) and verify settings in the Impulse tab
3. Click the ’Export impulse response’ button
Note: The frequency export options are remembered - also after a restart of the application
Time window
The time window lets you define the range of samples that should be exported
• 32 bit float
• 16 bit PCM (integer)
• 24 bit PCM (integer)
• 32 bit PCM (integer)
Chapter 4
Importing a response
Note: The samplerate will be the current set under the ’Device & Signal’ tab
An example of a valid frequency response text-file:
Chapter 5
Measurement Options
The measurement options allows you to change the representation of the measurement.
Changing the options for the measurements does not affect the measurement data - only
the representation.
5.1 Normalization
When comparing measurements the input gain often differs, therefore the normalization
allows you to offset measurements.
Below shows the same measurement with two different normalization offset.
The third curve shows an inverted measurement
The phase is depending on the time-zero - In the above example the to graphs represents
the exact same measurement, but with a different time-zero. It is good to remember that
In above example the one impulse is delayed 2 samples, which gives a phase shift of 360
Degrees at 22.5 kHz.
• First peak
• Largest peak
• Causal impulse
5.3 Time-window
The time is used for gated measurements. Reflections/echoes can be neglected. The time-
window can be dynamically adjusted using the pointing device (The frequency response is
instantly updated)
Gating frequency
When the wavelength becomes longer than the time window the frequency response is no
longer reliable (rule of thumb).
1 344m/s
Gating frequency [Hz] = =
Time window [s] Time window [m]
Auto detect
The ’Auto Detect’ button will locate reflections from the main-impulse and set the time-
window just before these reflections.
The smoothing is optional and can be adjusted. In below graph the green curve is without
smoothing and the red and blue has different amount of smoothing
There are advantages and disadvantages compared to a constant (normal) time window
Chapter 6
Manipulation
The manipulation menu allows you to make certain operations on existing measurements
and make new simulated data.
k : Frequency number
A[k], B[k], C[k] : Complex sequences representing the three slots A,B,C
Difference (C = A - B)
Example: A and B are to drivers played where B has inverted polarity - then C is the
resulting response.
Sum (C = A + B)
Example: A and B are to drivers played - then C is the resulting response.
Product (C = A * B)
Example: A represents a driver and B represents a filter - then C is the result you will get
deploying the filter to the driver.
A[k] B[k]∗
C[k] = = A[k] , for all k
B[k] |B[k]|2
Inversion (B = 1 / A)
Example: A represents a measurement - then B is the filter you will need to deploy to the
speaker to get a flat response.
1 A[k]∗
B[k] = = , for all k
A[k] |A[k]|2
Appendix A
Mathematics
Below definitions and derivations can be found in many books. I have chosen to write
down my own derivations, because we have special cases when dealing with computational
Fourier transforms:
Symbol Definition
x[n] ∈ R, n = −N, . . . , N − 1
X[k] ∈ C, k = 0, . . . , L − 1
N
−1
X[k] = x[n]e[nk] (A.1)
n=−N
L−1
1
x[n] = X[n]e[nk]∗ (A.2)
L
k=0
N
−1
X[L − k] = x[n]e[n(L − k)] = X[k]∗
n=−N
N
−1
X[0] = x[n], X[0] ∈ R
n=−N
N
−1
X[N ] = (−1)n x[n], X[N ] ∈ R
n=−N
These properties can be used to see, that there is in fact only N frequencies with 2N = L
degrees of freedom
L−1
1
x[n] = X[k]e[nk]∗
L
k=0
N −1
1 1 1
= X[0] + (X[k]e[nk]∗ + X[k]∗ e[nk]) + X[N ] (−1)n
L L L
k=1
1 2
N
−1 π 1
= X[0] + |X [k]| cos nk + θ[k] + X[N ] (−1)n (A.3)
L L N L
k=1
where X [k] = |X [k]| eiθ[k] , θ[k] = arg(X[k])
This expression is the most general filtering. The relation to the impulse response x[n] is
L−1
1
xw [n] = XW [k]e[nk]∗
L
k=0
L−1
L−1
1 1
= W [k, j]X[j]e[nk]∗
L L
k=0 j=0
L−1
L N
1 1
= W [k, j] x[m]e[mj]e[nk]∗
L L
k=0 j=0 m=−N
⎛ ⎞
N
L−1
1 L−1
1
= x[m] ⎝ W [k, j]e[mj]e[nk]∗ ⎠
L L
m=−N k=0 j=0
N
= x[m]w[n, m]
m=−N
So that filtering in the frequency domain corresponds to another operation in the impulse
domain where:
L−1 L−1
1 1
w[n, m] = W [k, j]e[mj]e[nk]∗
L L
k=0 j=0
N
N
W [k, j] = w[n, m]e[mj]∗ e[nk]
n=−N m=−N
1 1 1
W [k] = δ[k] + δ [k + 1] + δ [k − 1]
2 4 4
or in table form:
1
W [0] =
2
1
W [−1] = W [1] =
4
In time domain using (A.5):
1 1 π
w[n] = + cos n
2 2 N
This is the well-known Hann time-window.
W [0] = 0.42
W [−1] = W [1] = 0.25
W [−2] = W [2] = 0.04
So as a rule of thumb:
In above the log-subscript denotes the logarithmic value of the number such that:
flog = log10 (f )
−
flog = log10 (f − )
+
flog = log10 (f + )
Δlog = log10 (Δ)
F [k], k = 0, ..., NF F T
The complex average is calculated without taking the norm of the complex frequencies:
N
1 1
FC,N [k] = × F [j]W [k, j] (A.8)
S j
j=1
N
1
where S = W [k, j] (Normalization constant)
j
j=1
FC,N [0] = F [0] (Special case for k = 0)
2(1/3) = 2(
0.5/3)
ΔN = = 1.12246...
f0 = 1000Hz/ΔN = 891Hz
f1 = 1000Hz × ΔN = 1122Hz
There is no standard filter shape for the W [k, j] filter in (A.8). The filter shape used in
this implementation is the Blackman filter:
⎧
⎪
⎨0.42 + 0.5 cos (πx) + 0.08 cos (2πx) , k /2 ≥ k ≥ 2k
0 1
W [k, j] = (A.9)
⎪
⎩0 , otherwise
where:
2
x = |jlog − klog |
Wlog
jlog = log10 (j)
klog = log10 (k)
x0.5 = 0.40547865 . . .
1 1
Wlog = (log10 (k1 ) − log10 (k0 )) = 2Δlog
x0.5 x0.5
|jlog − klog |
so that x = x0.5 ×
Δlog
the bandwidth of the filter has been adjusted for FWHM using x0.5 :
1
0.42 + 0.5 cos (πx0.5 ) + 0.08 cos (2πx0.5 ) =
2
W [k, k] = 1
1
W [k, k0 ] = W [k, k1 ] = (bandwidth)
2
A.3.2.2 Time-windowing
TWW(f ) = Time-window-width(f )
= (Smoothing-width(f ))−1 (A.10)
1 1
= × 1
f Δ− Δ
1
= T × (0.5/N ) (A.11)
2 − 2−(0.5/N )
1
where T = = period of frequency [s]
f
The exact form of this time-window depends on the logarithmic window function W [k, j],
but this expression (A.11) shows that the width of the time-window is proportional to the
time period. When windowing the impulse response using a symmetric window the half
window-width is what determines the time-gating frequency. Eg. for N = 1, 3, 6
1 1 1
TWWN =1 = × T 0.71 × T
2 22 ( 0.5/1)
− 2−(0.5/1)
1 1 1
TWWN =3 = × T 2.16 × T
2 22 ( 0.5/3)
− 2−(0.5/3)
1 1 1
TWWN =6 = × T 4.33 × T
2 2 2(0.5/6) − 2−(0.5/6)
The smoothing concept can be visualized with graphs. As a test impulse a artificial perfect
impulse followed by extreme noise can be used
Applying different smoothing cuts the noise away for different frequencies:
Here it has been chosen to display the time-window for each decade (1Hz, 10Hz, 100Hz,
1kHz, 10kHz)
F [k], k = 0, ..., NF F T
N
1 1
FA,N [k] = × |F [j]| W [k, j] (A.12)
S j
j=1
N
1
where S = W [j] (Normalization constant)
j
j=1
FA,N [0] = F [0] (Special case for k = 0)
Index
Bandpass, 21
Causal impulse, 16
FFT-Frequencies, 8
First peak, 16
First positive peak, 16
FPPO, 30
Largest peak, 16
Lowpass, 20
Non-Equidistant, 8
Normalization, 14
Room-response, 18
smoothing, 18
Text-file options, 8
Time zero, 15
Time-window, 17
wave-file, 9
woofer measurement, 20