42 #include "EST_sigpr.h"
43 #include "EST_cmd_line.h"
44 #include "EST_inline_utils.h"
45 #include "EST_sigpr.h"
72 cout <<
"position 1\n";
79 sig.
load(DATA
"/kdt_001.wav");
86 num_frames = (int)ceil(sig.
end() / 0.01);
87 fv.
resize(num_frames, lpc_order + 1);
148 int num_frames = 300;
149 fv.
resize(num_frames, lpc_order + 1);
152 for (i = 0; i < num_frames; ++i)
153 fv.
t(i) = shift * (float) i;
166 fv.
load(DATA
"/kdt_001.pm");
167 make_track(fv,
"lpc", lpc_order + 1);
178 cout <<
"position 3\n";
191 fv.
resize(EST_CURRENT, map);
206 coef_types.
append(
"power");
210 add_channels_to_map(map, coef_types, op);
211 fv.
resize(EST_CURRENT, map);
220 fv.
sub_track(part, 0, EST_ALL, 0,
"lpc_0",
"lpc_N");
231 fv.
sub_track(part, 0, EST_ALL,
"cep_0",
"cep_N");
238 fv.
sub_track(part, 0, EST_ALL,
"power", 1);
239 power(sig, part, 0.01);
254 base_list.
append(
"power");
269 fv.
resize(EST_CURRENT, map);
282 fv.
sub_track(part, 0, EST_ALL, 0,
"cep_0",
"cep_N");
286 fv.
sub_track(del, 0, EST_ALL, 0,
"cep_d_0",
"cep_d_N");
290 fv.
sub_track(acc, 0, EST_ALL, 0,
"cep_a_0",
"cep_a_N");
303 fv.
resize(EST_CURRENT, map);
311 fv.
resize(EST_CURRENT, map);
353 for (i = 0; i < 256; ++i)
354 frame[i] = (
float)sig.
a(i + 1000) * win_vals[i];
390 fv.
resize(EST_CURRENT, map);
399 int s_shift = int(shift *
float(sig.
sample_rate()));
408 int start = (k1 * s_shift) - (s_length/2);
420 fv.
load(DATA
"/kd1_001.pm");
421 fv.
resize(EST_CURRENT, map);
438 int start = (irint(fv.
t(k2) * sig.
sample_rate()) - (s_length/2));
454 int filter_order = 99;
A class for storing digital waveforms. The waveform is stored as an array of 16 bit shorts...
EST_read_status load(const EST_String filename, int offset=0, int length=0, int rate=default_sample_rate)
EST_FVector design_FIR_filter(const EST_FVector &freq_response, int filter_order)
void FIRfilter(EST_Wave &in_sig, const EST_FVector &numerator, int delay_correction=0)
static Func * creator(const char *name, bool report_error=false)
Return the creation function for the given window type.
void delta(EST_Track &tr, EST_Track &d, int regression_length=3)
float & t(int i=0)
return time position of frame i
static void window_signal(const EST_Wave &sig, EST_WindowFunc *make_window, int start, int size, EST_TBuffer< float > &frame)
EST_FVector design_lowpass_FIR_filter(int sample_rate, int freq, int order)
A vector class for floating point numbers. EST_FVector x should be used instead of float *x wherever ...
void FIRlowpass_filter(EST_Wave &sigin, int freq, int order=DEFAULT_FILTER_ORDER)
void power(EST_Wave &sig, EST_Track &a, float factor)
static void make_window(EST_TBuffer< float > &window_vals, int size, const char *name, int window_centre)
void sig2coef(EST_Wave &sig, EST_Track &a, EST_String type, float factor=2.0, EST_WindowFunc *wf=EST_Window::creator(DEFAULT_WINDOW_NAME))
void sub_track(EST_Track &st, int start_frame=0, int nframes=EST_ALL, int start_chan=0, int nchans=EST_ALL)
EST_read_status load(const EST_String name, float ishift=0.0, float startt=0.0)
int get_frame_size(EST_Track &pms, int current_pos, int sample_rate, int prefer_prev=0)
short & a(int i, int channel=0)
void FIRlowpass_double_filter(EST_Wave &sigin, int freq, int order=DEFAULT_FILTER_ORDER)
void resize(int num_frames, int num_channels, bool preserve=1)
int Stringtoi(EST_String s)
Make an int from a EST_String. EST_String equivalent of atoi()
void sigpr_delta(EST_Wave &sig, EST_Track &fv, EST_Features &op, const EST_StrList &slist)
void EST_WindowFunc(int size, EST_TBuffer< float > &r_window, int window_centre)
Function which creates a window.
void FIRhighpass_filter(EST_Wave &in_sig, int freq, int order)
void append(const T &item)
add item onto end of list
void sigpr_acc(EST_Wave &sig, EST_Track &fv, EST_Features &op, const EST_StrList &slist)
float end()
return the time position of the last sample.
int sample_rate() const
return the sampling rate (frequency)
void FIRhighpass_double_filter(EST_Wave &sigin, int freq, int order=DEFAULT_FILTER_ORDER)
int num_frames() const
return number of frames in track
void frame(EST_FVector &fv, int n, int startf=0, int nf=EST_ALL)
void fill_time(float t, int start=1)
void clear(void)
remove all items in list
void sig2lpc(const EST_FVector &sig, EST_FVector &acf, EST_FVector &ref, EST_FVector &lpc)
void sigpr_base(EST_Wave &sig, EST_Track &fv, EST_Features &op, const EST_StrList &slist)
EST_FVector design_highpass_FIR_filter(int sample_rate, int freq, int order)