Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Karin Luo Loh
toolbox
Commits
81eb0eea
Commit
81eb0eea
authored
Oct 19, 2018
by
Markus Mueller-Trapet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix for band frequencies below 20Hz
parent
5d1cc16c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
kernel/DSP/Edit/ita_mpb_filter.m
kernel/DSP/Edit/ita_mpb_filter.m
+8
-4
No files found.
kernel/DSP/Edit/ita_mpb_filter.m
View file @
81eb0eea
...
...
@@ -230,7 +230,7 @@ if sizeinput > option_idx
i
=
i
+
1
;
else
specs
.
zerophase
=
true
;
end
;
end
case
{
'minimumphase'
,
'minimum-phase'
,
'minimum phase'
}
%set filter to have no phase at all
if
~
specs
.
frequencyfiltering
...
...
@@ -338,6 +338,10 @@ if specs.frequencyfiltering && ~isfield(Filter,'impulseResponse')
% Make impulse. Use fft_degree 15 and resize afterwards for performance
% reasons.
FFT_DEGREE_FILTER
=
15
;
% when filters are too short for low frequencies
if
min
(
specs
.
octavefreqrange
)
<
20
FFT_DEGREE_FILTER
=
18
;
end
impulse
=
ita_generate
(
'impulse'
,
1
,
specs
.
samplingRate
,
FFT_DEGREE_FILTER
);
impulse
=
ita_metainfo_rm_channelsettings
(
impulse
);
...
...
@@ -361,7 +365,7 @@ function Filter = mpb_generate_filter(specs)
switch
specs
.
filter_mask
case
'a-weight'
warning
off
%#ok<WNOFF>
warning
off
f1
=
20.598997
;
f2
=
107.65265
;
f3
=
737.86223
;
...
...
@@ -375,7 +379,7 @@ switch specs.filter_mask
Filter
.
Hd
=
convert
(
Hd
,
'df2sos'
);
case
'c-weight'
% C weightning
warning
off
%#ok<WNOFF>
warning
off
f1
=
20.598997
;
f4
=
12194.217
;
C1000
=
0.0619
;
...
...
@@ -392,7 +396,7 @@ switch specs.filter_mask
h
=
fdesign
.
bandpass
(
'N,F3dB1,F3dB2'
,
specs
.
filterorder
,
fc
*
2
^
(
-
1
/
b
/
2
)/
sr
,
fc
*
2
^
(
1
/
b
/
2
)/
sr
);
% pdi new round according to ANSI
[
freqvecAnsi
freqvecExact
]
=
ita_ANSI_center_frequencies
(
specs
.
octavefreqrange
([
1
end
]),
b
,
sr
);
[
freqvecAnsi
,
freqvecExact
]
=
ita_ANSI_center_frequencies
(
specs
.
octavefreqrange
([
1
end
]),
b
,
sr
);
for
cdx
=
1
:
length
(
freqvecExact
)
%go thru all filters
fc
=
freqvecExact
(
cdx
);
% exact center frequency
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment