54 float offset,
float length);
65 for (k = keylab.
head(); k; k = k->
next())
89 for (k = keylab.
head(); k; k = k->
next())
93 if (key_file_name == file)
100 cerr <<
"Couldn't locate file fragment " << file <<
" in keylab file\n";
106 float offset,
float length)
124 cerr <<
"Subset past end of signal\n";
132 subsig.
copy(subwave);
141 float kstart, length;
148 cerr <<
"Key file must extend beyond end of EST_Track\n";
149 cerr <<
"key end: " << key.
tail()->
F(
"end") <<
" EST_Track end: " 158 length =
end(*k) - kstart;
162 for (i = 0, l = 0; i < fv.
num_frames(); ++i, ++l)
167 if (fv.
t(i) > k->
F(
"end"))
172 kstart = k->
F(
"end");
175 length = k->
F(
"end") - kstart;
A class for storing digital waveforms. The waveform is stored as an array of 16 bit shorts...
float end(const EST_Item &item)
const EST_String name() const
int track_divide(EST_TList< EST_Track > &mtfr, EST_Track &fv, EST_Relation &key)
int num_channels() const
return number of channels in track
int wave_subwave(EST_Wave &subsig, EST_Wave &sig, int offset, int length)
int wave_divide(EST_WaveList &wl, EST_Wave &sig, EST_Relation &keylab, const EST_String &ext)
void copy(const EST_Wave &from)
void set_name(const EST_String n)
Sets name.
ssize_t num_samples() const
return the number of samples in the waveform
void resize(ssize_t num_frames, int num_channels, bool preserve=1)
void sub_wave(EST_Wave &sw, int offset=0, ssize_t num=EST_ALL, ssize_t start_c=0, ssize_t nchan=EST_ALL)
const EST_Val f(const EST_String &name) const
void set_num_frames(ssize_t n, bool preserve=1)
float & t(ssize_t i=0)
return time position of frame i
float F(const EST_String &name) const
void set_name(const EST_String &n)
set name of track - redundant use access to features
ssize_t num_frames() const
return number of frames in track
void append(const T &item)
add item onto end of list
int sample_rate() const
return the sampling rate (frequency)
float start(const EST_Item &item)
int wave_extract(EST_Wave &part, EST_Wave &sig, EST_Relation &keylab, const EST_String &file)
void clear()
clear waveform and set size to 0.
void fill_time(float t, int start=1)
void clear(void)
remove all items in list
Utility EST_String Functions header file.