129 tr.
t(i) = (float) i * 0.01;
160 for (i = 50; i < 100; ++i)
166 for (i = 50; i < 100; ++i)
175 cout <<
"Frame 60 is not a break\n";
178 cout <<
"Frame 60 is a break\n";
282 tr.
frame(tmp_frame, 50);
304 tr.
channel(tmp_channel,
"energy");
312 tr.
frame(tmp_frame, 50, 2, 9);
317 tr.
channel(tmp_channel, 5, 400, 100);
367 melcep(sig, sub, 1.0, 20, 22);
385 tr.
sub_track(sub, 0, EST_ALL,
"cep_0",
"cep_N");
390 tr.
sub_track(sub, 0, EST_ALL,
"cep_0",
"cep_N");
398 tr.
sub_track(sub, 47, 39,
"cep_0",
"cep_N");
412 for (frames.
begin(tr); frames; ++frames)
415 if (frames.
n() % 50 ==0)
416 cout <<
" " << frames.
n() <<
"[" << frame.
t() <<
"]";
439 float *channel_buf, *frame_buf;
472 aux_names.
append(
"voicing");
473 aux_names.
append(
"join_points");
483 for (i = 0; i < 500; ++i)
485 tr.aux(i,
"voicing") = i;
486 tr.aux(i,
"join_points") =
EST_String(
"stuff");
487 tr.aux(i,
"cost") = 0.111;
499 if (tr.
save(
"tmp/track.htk",
"htk") != write_ok)
500 EST_error(
"can't save htk file\n");
505 if (tr.
save(
"tmp/track.est",
"est") != write_ok)
506 EST_error(
"can't save est file\n");
511 if (tr.
save(
"tmp/track.ascii",
"ascii") != write_ok)
512 EST_error(
"can't save ascii file\n");
520 if (tr2.
load(
"tmp/track.htk") != read_ok)
521 EST_error(
"can't reload htk\n");
530 if (tr.
load(
"tmp/track.ascii", 0.01) != read_ok)
531 EST_error(
"can't reload ascii file\n");
unsigned int n() const
Return the current position.
void begin(const Container &over)
Set the iterator ready to run over this container.
void clear(void)
remove all items in list
void append(const T &item)
add item onto end of list
void copy_channel_out(int n, float *buf, int offset=0, int num=EST_ALL) const
void copy_frame_in(int n, const float *buf, int offset=0, int num=EST_ALL)
void set_num_frames(int n, bool preserve=1)
void set_channel_name(const EST_String &name, int channel)
set the name of the channel.
void copy_channel_in(int n, const float *buf, int offset=0, int num=EST_ALL)
EST_read_status load(const EST_String name, float ishift=0.0, float startt=0.0)
int track_break(int i) const
return true if frame i is a break
float & t(int i=0)
return time position of frame i
int val(int i) const
return true if frame i is a value
EST_write_status save(const EST_String name, const EST_String EST_filetype="")
float & a(int i, int c=0)
void sub_track(EST_Track &st, int start_frame=0, int nframes=EST_ALL, int start_chan=0, int nchans=EST_ALL)
void set_num_channels(int n, bool preserve=1)
void set_value(int i)
set frame i to be a value
void resize_aux(EST_StrList &map, bool preserve=1)
int num_channels() const
return number of channels in track
int num_frames() const
return number of frames in track
void channel(EST_FVector &cv, int n, int startf=0, int nf=EST_ALL)
void resize(int num_frames, int num_channels, bool preserve=1)
void fill_time(float t, int start=1)
void frame(EST_FVector &fv, int n, int startf=0, int nf=EST_ALL)
void copy_frame_out(int n, float *buf, int offset=0, int num=EST_ALL) const
void set_break(int i)
set frame i to be a break