45#include "sigpr/EST_filter.h"
46#include "sigpr/EST_pitchmark.h"
47#include "ling_class/EST_Relation.h"
49#include "EST_inline_utils.h"
50#include "EST_wave_aux.h"
51#include "EST_track_aux.h"
62 pm.set_equal_space(
false);
66 cout <<
"pitchmark 1\n";
72 cout <<
"pitchmark 2\n";
75 lx.save(
"tmpfilt.lx");
82 lxdiff.set_sample_rate(
lx.sample_rate());
97 lxdiff.save(
"tmpfiltdiff.lx");
111 op.
I(
"lx_low_frequency") : 400;
113 op.
I(
"lx_low_order") : 19;
116 op.
I(
"lx_high_frequency") : 40;
118 op.
I(
"lx_high_order") : 19;
121 op.
I(
"df_low_frequency") : 1000;
123 op.
I(
"df_low_order") : 0;
126 op.
I(
"median_order") : 19;
128 debug = op.
present(
"pm_debug") ? 1 : 0;
141 for (i =
j = 0; i <
pm.num_frames() - 1; ++i, ++
j)
144 while ((i < (
pm.num_frames() - 1)) && ((
pm.t(i + 1) -
pm.t(i)) < min))
147 if (i <
pm.num_frames())
149 pm.resize(
j,
pm.num_channels());
176 for(
j = 0;
j <
pm.num_frames();
j++)
178 float current =
pm.t(
j);
183 if (current - last < min)
189 else if (current-last > max)
192 int num = ifloor((current - last)/ def);
193 float size = (current-last) /
num;
194 for (i = 1; i <=
num; i++)
214 for (i = 1; i <=
num; i++)
227 pm.resize(
npm,
pm.num_channels());
228 for (i = 0; i <
npm; i++)
235 pm.resize(
lx.num_samples(), EST_CURRENT);
237 for (i = 1,
j = 0; i <
lx.num_samples(); ++i)
238 if ((
lx.a(i -1) > 0) && (
lx.a(i) <= 0))
241 pm.resize(
j, EST_CURRENT);
243 for (i = 0; i <
pm.num_frames(); ++i)
252 for (
int i = 0; i <
pm.num_frames(); ++i)
256 seg->set(
"end",
pm.t(i));
264 f0.resize(EST_ALL, 1);
266 for (
int i = 0; i <
f0.num_frames(); ++i)
278 fz.resize((
int)(
pm.end()/shift), 1);
281 for (i = 0; i <
fz.num_frames() -1 ; ++i)
283 period = get_time_frame_size(
pm,
pm.index_below(
fz.t(i)));
int present(const EST_String &name) const
const int I(const EST_String &path) const