#include <include/EST_Track.h>
Classes | |
class | IPointer_f |
Public Types | |
typedef EST_Track | Entry |
typedef EST_TIterator< EST_Track, IPointer_f, EST_Track > | Entries |
typedef EST_TRwIterator< EST_Track, IPointer_f, EST_Track > | RwEntries |
Public Types inherited from EST_Featured | |
typedef EST_TKVI< EST_String, EST_Val > | FeatEntry |
typedef EST_TStructIterator< EST_Featured, IPointer_feat, FeatEntry > | FeatEntries |
typedef EST_TRwStructIterator< EST_Featured, IPointer_feat, FeatEntry > | RwFeatEntries |
Public Member Functions | |
EST_Track & | operator= (const EST_Track &a) |
EST_Track & | operator+= (const EST_Track &a) |
EST_Track & | operator|= (const EST_Track &a) |
EST_Track (ssize_t num_frames, EST_TrackMap &map) | |
void | assign_map (EST_TrackMap::P map) |
void | assign_map (EST_TrackMap &map) |
void | create_map (EST_ChannelNameMap &names) |
void | create_map (void) |
EST_TrackMap::P | map () const |
int | channel_position (EST_ChannelType type, int offset=0) const |
float & | a (ssize_t i, EST_ChannelType c, int offset=0) |
float | a (ssize_t i, EST_ChannelType c, int offset=0) const |
float & | a (float t, EST_ChannelType c, EST_InterpType interp=it_nearest) |
float | a (float t, EST_ChannelType c, EST_InterpType interp=it_nearest) const |
float & | operator() (ssize_t i, EST_ChannelType c) |
float | operator() (ssize_t i, EST_ChannelType c) const |
float & | t_offset () |
float | t_offset () const |
EST_read_status | load_channel_names (const EST_String name) |
EST_write_status | save_channel_names (const EST_String name) |
const EST_String | channel_name (int channel, const EST_ChannelNameMap &map, int strings_override=1) const |
const EST_String | channel_name (int channel, int strings_override=1) const |
const EST_String | aux_channel_name (int channel) const |
void | resize (ssize_t num_frames, EST_TrackMap &map) |
EST_TrackFileType | file_type () const |
void | set_file_type (EST_TrackFileType t) |
bool | has_channel (EST_ChannelType type) const |
Constructor and Destructor functions | |
EST_Track () | |
Default constructor. More... | |
EST_Track (const EST_Track &a) | |
Copy constructor. More... | |
EST_Track (ssize_t num_frames, int num_channels) | |
resizing constructor More... | |
EST_Track (ssize_t num_frames, EST_StrList &map) | |
resizing constructor More... | |
~EST_Track () | |
default destructor More... | |
Configuring Tracks | |
void | resize (ssize_t num_frames, int num_channels, bool preserve=1) |
void | resize (ssize_t num_frames, EST_StrList &map, bool preserve=1) |
void | resize_aux (EST_StrList &map, bool preserve=1) |
void | set_num_channels (int n, bool preserve=1) |
void | set_num_frames (ssize_t n, bool preserve=1) |
void | set_channel_name (const EST_String &name, int channel) |
set the name of the channel. More... | |
void | set_aux_channel_name (const EST_String &name, int channel) |
set the name of the auxiliary channel. More... | |
void | copy_setup (const EST_Track &a) |
copy everything but data More... | |
Global track information | |
EST_String | name () const |
name of track - redundant use access to features More... | |
void | set_name (const EST_String &n) |
set name of track - redundant use access to features More... | |
Functions for sub tracks, channels and frames. | |
void | frame (EST_FVector &fv, int n, int startf=0, int nf=EST_ALL) |
void | channel (EST_FVector &cv, ssize_t n, int startf=0, int nf=EST_ALL) |
void | channel (EST_FVector &cv, const char *name, int startf=0, int nf=EST_ALL) |
void | sub_track (EST_Track &st, int start_frame=0, int nframes=EST_ALL, int start_chan=0, int nchans=EST_ALL) |
void | sub_track (EST_Track &st, int start_frame, int nframes, const EST_String &start_chan_name, int nchans=EST_ALL) |
void | sub_track (EST_Track &st, int start_frame, int nframes, const EST_String &start_chan_name, const EST_String &end_chan_name) |
void | sub_track (EST_Track &st, int start_frame=0, int nframes=EST_ALL, int start_chan=0, int nchans=EST_ALL) const |
void | copy_sub_track (EST_Track &st, int start_frame=0, int nframes=EST_ALL, int start_chan=0, int nchans=EST_ALL) const |
void | copy_sub_track_out (EST_Track &st, const EST_FVector &frame_times) const |
void | copy_sub_track_out (EST_Track &st, const EST_IVector &frame_indices) const |
void | copy_channel_out (int n, float *buf, int offset=0, int num=EST_ALL) const |
void | copy_channel_out (int n, EST_FVector &f, int offset=0, int num=EST_ALL) const |
void | copy_frame_out (int n, float *buf, int offset=0, int num=EST_ALL) const |
void | copy_frame_out (int n, EST_FVector &f, int offset=0, int num=EST_ALL) const |
void | copy_channel_in (int n, const float *buf, int offset=0, int num=EST_ALL) |
void | copy_channel_in (int n, const EST_FVector &f, int offset=0, int num=EST_ALL) |
void | copy_channel_in (int c, const EST_Track &from, int from_c, int from_offset=0, int offset=0, int num=EST_ALL) |
void | copy_frame_in (int n, const float *buf, int offset=0, int num=EST_ALL) |
void | copy_frame_in (int n, const EST_FVector &t, int offset=0, int num=EST_ALL) |
void | copy_frame_in (ssize_t i, const EST_Track &from, int from_f, int from_offset=0, int offset=0, int num=EST_ALL) |
Channel information | |
int | channel_position (const char *name, int offset=0) const |
int | channel_position (EST_String name, int offset=0) const |
bool | has_channel (const char *name) const |
bool | has_channel (EST_String name) const |
Accessing amplitudes The following functions can be used | |
to access to amplitude of the track at certain points. Most of these functions can be used for reading or writing to this point, thus tr.a(10, 5) = 10.3; can be used to set the 10th frame of the 5th channel and cout << tr.a(10, 5); can be used to print the same information. Most of these functions have a const equivalent for helping the compiler in read only operations. | |
float & | a (ssize_t i, int c=0) |
float | a (ssize_t i, int c=0) const |
float & | a_no_check (ssize_t i, int c=0) |
float | a_no_check (ssize_t i, int c=0) const |
float & | a (ssize_t i, const char *name, int offset=0) |
float | a (ssize_t i, const char *name, int offset=0) const |
float & | a (ssize_t i, EST_String name, int offset=0) |
float | a (ssize_t i, EST_String name, int offset=0) const |
float & | a (float t, int c=0, EST_InterpType interp=it_nearest) |
float | a (float t, int c=0, EST_InterpType interp=it_nearest) const |
float & | operator() (ssize_t i, int c) |
float & | operator() (ssize_t i) |
float | operator() (ssize_t i, int c) const |
float | operator() (ssize_t i) const |
float & | operator() (float t, int c) |
float & | operator() (float t) |
float | operator() (float t, int c) const |
float | operator() (float t) const |
Timing | |
float & | t (ssize_t i=0) |
return time position of frame i More... | |
float | t (ssize_t i=0) const |
float | ms_t (ssize_t i) const |
return time of frame i in milli-seconds. More... | |
void | fill_time (float t, int start=1) |
void | fill_time (float t, float start) |
void | fill_time (const EST_Track &t) |
void | fill (float v) |
void | sample (float shift) |
void | change_type (float nshift, bool single_break) |
REDO. More... | |
float | shift () const |
float | start () const |
return time of first value in track More... | |
float | end () const |
return time of last value in track More... | |
Auxiliary channels | |
Auxiliary information is used to store information that goes along with frames, but which are not amplitudes and hence not appropriate for operations such as interpolation, smoothing etc. The aux() array is an array of EST_Vals which allows points to be int, float or a string. The following functions can be used to access to auxiliary track information. Most of these functions can be used for reading or writing to this point, thus tr.aux(10, "voicing") = 1; can be used to set the 10th frame of the "voicing" channel and cout << tr.a(10, "voicing"); can be used to print the same information. Most of these functions have a const equivalent for helping the compiler in read only operations. Auxiliary channels are usually accessed by name rather than numerical index. The names are set using the set_aux_channel_names() function. | |
EST_Val & | aux (ssize_t i, int c) |
EST_Val & | aux (ssize_t i, int c) const |
EST_Val & | aux (ssize_t i, const char *name) |
EST_Val | aux (ssize_t i, const char *name) const |
EST_Val & | aux (ssize_t i, EST_String name) |
EST_Val | aux (ssize_t i, EST_String name) const |
File i/o functions | |
EST_read_status | load (const EST_String name, float ishift=0.0, float startt=0.0) |
EST_read_status | load (EST_TokenStream &ts, float ishift=0.0, float startt=0.0) |
EST_read_status | load (const EST_String name, const EST_String type, float ishift=0.0, float startt=0.0) |
EST_write_status | save (const EST_String name, const EST_String EST_filetype="") |
EST_write_status | save (FILE *fp, const EST_String EST_filetype="") |
Utility functions | |
int | empty () const |
returns true if no values are set in the frame More... | |
void | set_break (ssize_t i) |
set frame i to be a break More... | |
void | set_value (ssize_t i) |
set frame i to be a value More... | |
int | val (ssize_t i) const |
return true if frame i is a value More... | |
int | track_break (ssize_t i) const |
return true if frame i is a break More... | |
ssize_t | prev_non_break (ssize_t i) const |
ssize_t | next_non_break (ssize_t i) const |
ssize_t | index (float t) const |
return the frame index nearest time t More... | |
ssize_t | index_below (float x) const |
return the frame index before time t More... | |
ssize_t | num_frames () const |
return number of frames in track More... | |
ssize_t | length () const |
return number of frames in track More... | |
int | num_channels () const |
return number of channels in track More... | |
int | num_aux_channels () const |
return number of auxiliary channels in track More... | |
void | add_trailing_breaks () |
void | rm_trailing_breaks () |
void | rm_excess_breaks () |
bool | equal_space () const |
return true if track has equal (i.e. fixed) frame spacing */ More... | |
bool | single_break () const |
void | set_equal_space (bool t) |
void | set_single_break (bool t) |
Public Member Functions inherited from EST_Featured | |
int | f_Int (const char *name, int def) const |
int | f_Int (const char *name) const |
int | f_I (const char *name, int def) const |
int | f_I (const char *name) const |
void | f_set (const EST_String name, int val) |
void | f_set_path (const EST_String name, int val) |
float | f_Float (const char *name, float def) const |
float | f_Float (const char *name) const |
float | f_F (const char *name, float def) const |
float | f_F (const char *name) const |
void | f_set (const EST_String name, float val) |
void | f_set_path (const EST_String name, float val) |
EST_String | f_String (const char *name, const EST_String &def) const |
EST_String | f_String (const char *name) const |
EST_String | f_S (const char *name, const EST_String &def) const |
EST_String | f_S (const char *name) const |
void | f_set (const EST_String name, const char *val) |
void | f_set_path (const EST_String name, const char *val) |
const EST_Val & | f_Val (const char *name, const EST_Val &def) const |
const EST_Val & | f_Val (const char *name) const |
const EST_Val & | f_V (const char *name, const EST_Val &def) const |
const EST_Val & | f_V (const char *name) const |
void | f_set_val (const EST_String name, EST_Val val) |
void | f_set_path (const EST_String name, EST_Val val) |
void | f_set (const EST_Features &f) |
int | f_present (const EST_String name) const |
void | f_remove (const EST_String name) |
Static Public Attributes | |
static const float | default_frame_shift =0.005 |
static const int | default_sample_rate =16000 |
Protected Member Functions | |
void | default_vals () |
void | default_channel_names () |
void | clear_arrays () |
void | pad_breaks () |
int | interp_value (float x, float f) |
float | interp_amp (float x, int c, float f) |
float | estimate_shift (float x) |
void | copy (const EST_Track &a) |
void | point_to_first (IPointer_f &ip) const |
void | move_pointer_forwards (IPointer_f &ip) const |
bool | points_to_something (const IPointer_f &ip) const |
EST_Track & | points_at (const IPointer_f &ip) |
Protected Member Functions inherited from EST_Featured | |
EST_Featured (void) | |
EST_Featured (const EST_Featured &f) | |
~EST_Featured (void) | |
void | init_features () |
void | copy_features (const EST_Featured &f) |
void | clear_features () |
void | ensure_features (void) |
void | point_to_first (IPointer_feat &ip) const |
void | move_pointer_forwards (IPointer_feat &ip) const |
bool | points_to_something (const IPointer_feat &ip) const |
EST_TKVI< EST_String, EST_Val > & | points_at (const IPointer_feat &ip) |
Friends | |
class | EST_TIterator< EST_Track, IPointer_f, EST_Track > |
class | EST_TRwIterator< EST_Track, IPointer_f, EST_Track > |
std::ostream & | operator<< (std::ostream &s, const EST_Track &tr) |
A class for storing time aligned coefficients.
some stuff.
Definition at line 90 of file EST_Track.h.
typedef EST_Track EST_Track::Entry |
Definition at line 764 of file EST_Track.h.
typedef EST_TIterator< EST_Track, IPointer_f, EST_Track > EST_Track::Entries |
Definition at line 765 of file EST_Track.h.
typedef EST_TRwIterator< EST_Track, IPointer_f, EST_Track > EST_Track::RwEntries |
Definition at line 766 of file EST_Track.h.
EST_Track::EST_Track | ( | ) |
Default constructor.
Definition at line 57 of file EST_Track.cc.
EST_Track::EST_Track | ( | const EST_Track & | a | ) |
Copy constructor.
Definition at line 62 of file EST_Track.cc.
resizing constructor
Definition at line 68 of file EST_Track.cc.
EST_Track::EST_Track | ( | ssize_t | num_frames, |
EST_StrList & | map | ||
) |
resizing constructor
EST_Track::~EST_Track | ( | void | ) |
default destructor
Definition at line 97 of file EST_Track.cc.
EST_Track::EST_Track | ( | ssize_t | num_frames, |
EST_TrackMap & | map | ||
) |
Definition at line 83 of file EST_Track.cc.
|
protected |
Definition at line 108 of file EST_Track.cc.
|
protected |
Definition at line 102 of file EST_Track.cc.
|
protected |
|
protected |
Definition at line 916 of file EST_Track.cc.
|
protected |
Definition at line 737 of file EST_Track.cc.
|
protected |
Definition at line 705 of file EST_Track.cc.
|
protected |
Definition at line 771 of file EST_Track.cc.
|
protected |
Definition at line 194 of file EST_Track.cc.
resize the track to have num_frames
and num_channels
. if preserve
is set to 1, any existing values in the track are kept, up to the limits imposed by the new number of frames and channels. If the new track size is bigger, new positions are filled with 0
Definition at line 214 of file EST_Track.cc.
void EST_Track::resize | ( | ssize_t | num_frames, |
EST_StrList & | map, | ||
bool | preserve = 1 |
||
) |
resize the track to have num_frames
and num_channels
. if preserve
is set to 1, any existing values in the track are kept, up to the limits imposed by the new number of frames and channels. If the new track size is bigger, new positions are filled with 0
Definition at line 286 of file EST_Track.cc.
void EST_Track::resize_aux | ( | EST_StrList & | map, |
bool | preserve = 1 |
||
) |
resize the track's auxiliary channels.
Definition at line 314 of file EST_Track.cc.
Change the number of channels while keeping the number of frames the same. if preserve
is set to 1, any existing values in the track are kept, up to the limits imposed by the new number of frames and channels. If the new track size is bigger, new positions are filled with 0
Definition at line 170 of file EST_Track.h.
Change the number of frames while keeping the number of channels the same. if preserve
is set to 1, any existing values in the track are kept, up to the limits imposed by the new number of frames and channels. If the new track size is bigger, new positions are filled with 0
Definition at line 178 of file EST_Track.h.
void EST_Track::set_channel_name | ( | const EST_String & | name, |
int | channel | ||
) |
set the name of the channel.
Definition at line 168 of file EST_Track.cc.
void EST_Track::set_aux_channel_name | ( | const EST_String & | name, |
int | channel | ||
) |
set the name of the auxiliary channel.
Definition at line 173 of file EST_Track.cc.
void EST_Track::copy_setup | ( | const EST_Track & | a | ) |
copy everything but data
Definition at line 205 of file EST_Track.cc.
|
inline |
name of track - redundant use access to features
Definition at line 196 of file EST_Track.h.
|
inline |
set name of track - redundant use access to features
Definition at line 199 of file EST_Track.h.
|
inline |
make fv
a window to frame n
in the track.
Definition at line 210 of file EST_Track.h.
|
inline |
make fv
a window to channel n
in the track.
Definition at line 215 of file EST_Track.h.
void EST_Track::channel | ( | EST_FVector & | cv, |
const char * | name, | ||
int | startf = 0 , |
||
int | nf = EST_ALL |
||
) |
make fv
a window to the named channel in the track.
Definition at line 1049 of file EST_Track.cc.
void EST_Track::sub_track | ( | EST_Track & | st, |
int | start_frame = 0 , |
||
int | nframes = EST_ALL , |
||
int | start_chan = 0 , |
||
int | nchans = EST_ALL |
||
) |
make st
refer to a portion of the track. No values are copied - an internal pointer in st is set to the specified portion of the the track. After this, st behaves like a normal track. Its first channel is the same as start_channel and its first frame is the same as start_frame. Any values written into st will changes values in the main track. st cannot be resized.
start_frame | first frame at which sub-track starts |
nframes | number of frames to be included in total |
start_channel | first channel at which sub-track starts |
nframes | number of channels to be included in total |
Definition at line 1100 of file EST_Track.cc.
void EST_Track::sub_track | ( | EST_Track & | st, |
int | start_frame, | ||
int | nframes, | ||
const EST_String & | start_chan_name, | ||
int | nchans = EST_ALL |
||
) |
make st
refer to a portion of the track. No values are copied - an internal pointer in st is set to the specified portion of the the track. After this, st behaves like a normal track. Its first channel is the same as start_channel and its first frame is the same as start_frame. Any values written into st will changes values in the main track. st cannot be resized.
start_frame | first frame at which sub-track starts |
nframes | number of frames to be included in total |
start_channel_name | name of channel at which sub-track starts |
end_channel_name | name of channel at which sub-track stops |
Definition at line 1060 of file EST_Track.cc.
void EST_Track::sub_track | ( | EST_Track & | st, |
int | start_frame, | ||
int | nframes, | ||
const EST_String & | start_chan_name, | ||
const EST_String & | end_chan_name | ||
) |
make st
refer to a portion of the track. No values are copied - an internal pointer in st is set to the specified portion of the the track. After this, st behaves like a normal track. Its first channel is the same as start_channel and its first frame is the same as start_frame. Any values written into st will changes values in the main track. st cannot be resized.
start_frame | first frame at which sub-track starts |
nframes | number of frames to be included in total |
start_channel_name | name of channel at which sub-track starts |
end_channel_name | name of channel at which sub-track stops |
Definition at line 1075 of file EST_Track.cc.
|
inline |
make st
refer to a portion of the track. (const version) No values are copied - an internal pointer in st is set to the specified portion of the the track. After this, st behaves like a normal track. Its first channel is the same as start_channel and its first frame is the same as start_frame. Any values written into st will changes values in the main track. st cannot be resized.
start_frame | first frame at which sub-track starts |
nframes | number of frames to be included in total |
start_channel | first channel at which sub-track starts |
nframes | number of channels to be included in total |
Definition at line 286 of file EST_Track.h.
void EST_Track::copy_sub_track | ( | EST_Track & | st, |
int | start_frame = 0 , |
||
int | nframes = EST_ALL , |
||
int | start_chan = 0 , |
||
int | nchans = EST_ALL |
||
) | const |
Copy contiguous portion of track into st
. Unlike the normal sub_track functions, this makes a completely new track. values written into this will not affect the main track and it can be resized.
start_frame | first frame at which sub-track starts |
nframes | number of frames to be included in total |
start_channel | first channel at which sub-track starts |
nframes | number of channels to be included in total |
Definition at line 1139 of file EST_Track.cc.
void EST_Track::copy_sub_track_out | ( | EST_Track & | st, |
const EST_FVector & | frame_times | ||
) | const |
Definition at line 1178 of file EST_Track.cc.
void EST_Track::copy_sub_track_out | ( | EST_Track & | st, |
const EST_IVector & | frame_indices | ||
) | const |
Definition at line 1202 of file EST_Track.cc.
|
inline |
copy channel n
into pre-allocated buffer buf
Definition at line 311 of file EST_Track.h.
|
inline |
copy channel n
into EST_FVector
Definition at line 316 of file EST_Track.h.
|
inline |
copy frame n
into pre-allocated buffer buf
Definition at line 321 of file EST_Track.h.
|
inline |
copy frame n
into EST_FVector
Definition at line 325 of file EST_Track.h.
|
inline |
copy buf into pre-allocated channel n of track
Definition at line 329 of file EST_Track.h.
|
inline |
copy f into pre-allocated channel n of track
Definition at line 334 of file EST_Track.h.
|
inline |
copy channel buf into pre-allocated channel n of track
Definition at line 339 of file EST_Track.h.
|
inline |
copy buf into frame n of track
Definition at line 346 of file EST_Track.h.
|
inline |
copy t into frame n of track
Definition at line 351 of file EST_Track.h.
|
inline |
copy from into frame n of track
Definition at line 356 of file EST_Track.h.
Return the position of channel name
if it exists, otherwise return -1.
Definition at line 395 of file EST_Track.cc.
|
inline |
Return the position of channel name
if it exists, otherwise return -1.
Definition at line 377 of file EST_Track.h.
|
inline |
Returns true if the track has a channel named name
, otherwise false.
Definition at line 385 of file EST_Track.h.
|
inline |
Returns true if the track has a channel named name
, otherwise false.
Definition at line 391 of file EST_Track.h.
return amplitude of frame i, channel c.
Definition at line 1025 of file EST_Track.cc.
Definition at line 1033 of file EST_Track.cc.
return amplitude of frame i, channel c with no bounds checking.
Definition at line 420 of file EST_Track.h.
Definition at line 421 of file EST_Track.h.
return amplitude of point i, in the channel named name plus offset. If you have a track with say channels called F0 and voicing, you can access the 45th frame's F0 as t.a(45, "F0"); If there are 20 cepstral coefficients for each frame, the 5th can be accessed as t.a(45, "cepstrum", 5);
Definition at line 406 of file EST_Track.cc.
Definition at line 432 of file EST_Track.h.
|
inline |
Definition at line 434 of file EST_Track.h.
|
inline |
Definition at line 436 of file EST_Track.h.
float & EST_Track::a | ( | float | t, |
int | c = 0 , |
||
EST_InterpType | interp = it_nearest |
||
) |
return amplitude of time t, channel c. This can be used for reading or writing to this point. By default the nearest frame to this time is used. If interp
is set to it_linear
, linear interpolation is performed between the two amplitudes of the two frames either side of the time point to give an estimation of what the amplitude would have been at time t
. If interp
is set to it_linear_nz
, interpolation is as above, unless the time requested is off the end of a portion of track in which case the nearest amplitude is returned.
Definition at line 440 of file EST_Track.cc.
|
inline |
Definition at line 451 of file EST_Track.h.
return amplitude of frame i, channel c.
Definition at line 456 of file EST_Track.h.
|
inline |
return amplitude of frame i, channel 0.
Definition at line 458 of file EST_Track.h.
Definition at line 459 of file EST_Track.h.
|
inline |
Definition at line 460 of file EST_Track.h.
|
inline |
return amplitude of frame nearest time t, channel c.
Definition at line 463 of file EST_Track.h.
|
inline |
return amplitude of frame nearest time t, channel 0.
Definition at line 465 of file EST_Track.h.
|
inline |
Definition at line 466 of file EST_Track.h.
|
inline |
Definition at line 467 of file EST_Track.h.
|
inline |
return time position of frame i
Definition at line 478 of file EST_Track.h.
|
inline |
Definition at line 479 of file EST_Track.h.
|
inline |
return time of frame i in milli-seconds.
Definition at line 482 of file EST_Track.h.
void EST_Track::fill_time | ( | float | t, |
int | start = 1 |
||
) |
set frame times to regular intervals of time t
. The start
parameter specifies the integer multiple of t
at which to start. For example, setting this to 0 will start at time 0.0 (The default means the first time value = t
Definition at line 789 of file EST_Track.cc.
void EST_Track::fill_time | ( | float | t, |
float | start | ||
) |
set frame times to regular intervals of time t
. The start
parameter specifies the first time value.
Definition at line 797 of file EST_Track.cc.
void EST_Track::fill_time | ( | const EST_Track & | t | ) |
fill time channel with times from another track
Definition at line 805 of file EST_Track.cc.
|
inline |
fill all amplitudes with value v
Definition at line 501 of file EST_Track.h.
void EST_Track::sample | ( | float | shift | ) |
resample track at this frame shift, specified in seconds. This can be used to change a variable frame spaced track into a fixed frame track, or to change the spacing of an existing evenly spaced track.
Definition at line 674 of file EST_Track.cc.
void EST_Track::change_type | ( | float | nshift, |
bool | single_break | ||
) |
REDO.
Definition at line 656 of file EST_Track.cc.
float EST_Track::shift | ( | ) | const |
return an estimation of the frame spacing in seconds. This returns -1 if the track is not a fixed shift track
Definition at line 602 of file EST_Track.cc.
float EST_Track::start | ( | ) | const |
return time of first value in track
Definition at line 594 of file EST_Track.cc.
float EST_Track::end | ( | ) | const |
return time of last value in track
Definition at line 587 of file EST_Track.cc.
Definition at line 428 of file EST_Track.cc.
Definition at line 433 of file EST_Track.cc.
Definition at line 418 of file EST_Track.cc.
Definition at line 555 of file EST_Track.h.
|
inline |
Definition at line 558 of file EST_Track.h.
|
inline |
Definition at line 561 of file EST_Track.h.
EST_read_status EST_Track::load | ( | const EST_String | name, |
float | ishift = 0.0 , |
||
float | startt = 0.0 |
||
) |
Load a file called name
into the track. The load function attempts to automatically determine which file type is being loaded from the file's header. If no header is found, the function assumes the file is ascii data, with a fixed frame shift, arranged with rows representing frames and columns channels. In this case, the frame shift must be specified as an argument to this function. For those file formats which don't contain provision for specifying an initial time (e.g. HTK, or ascii...), the startt
parameter may be specified.
Definition at line 1312 of file EST_Track.cc.
EST_read_status EST_Track::load | ( | EST_TokenStream & | ts, |
float | ishift = 0.0 , |
||
float | startt = 0.0 |
||
) |
Load character data from an already opened tokenstream ts
into the track. The load function attempts to automatically determine which file type is being loaded from the file's header. If no header is found, the function assumes the file is ascii data, with a fixed frame shift, arranged with rows representing frames and columns channels. In this case, the frame shift must be specified as an argument to this function For those file formats which don't contain provision for specifying an initial time (e.g. HTK, or ascii...), the startt
parameter may be specified.
Definition at line 1278 of file EST_Track.cc.
EST_read_status EST_Track::load | ( | const EST_String | name, |
const EST_String | type, | ||
float | ishift = 0.0 , |
||
float | startt = 0.0 |
||
) |
Load a file called name
of format type
into the track. If no header is found, the function assumes the file is ascii data, with a fixed frame shift, arranged with rows representing frames and columns channels. In this case, the frame shift must be specified as an argument to this function For those file formats which don't contain provision for specifying an initial time (e.g. HTK, or ascii...), the startt
parameter may be specified.
Definition at line 1348 of file EST_Track.cc.
EST_write_status EST_Track::save | ( | const EST_String | name, |
const EST_String | EST_filetype = "" |
||
) |
Save the track to a file name
of format type
.
Definition at line 1233 of file EST_Track.cc.
EST_write_status EST_Track::save | ( | FILE * | fp, |
const EST_String | EST_filetype = "" |
||
) |
Save the track to a already opened file pointerFP
and write a file of format type
.
Definition at line 1257 of file EST_Track.cc.
int EST_Track::empty | ( | ) | const |
returns true if no values are set in the frame
Definition at line 1038 of file EST_Track.cc.
void EST_Track::set_break | ( | ssize_t | i | ) |
set frame i to be a break
Definition at line 124 of file EST_Track.cc.
void EST_Track::set_value | ( | ssize_t | i | ) |
set frame i to be a value
Definition at line 133 of file EST_Track.cc.
return true if frame i is a value
Definition at line 542 of file EST_Track.cc.
return true if frame i is a break
Definition at line 634 of file EST_Track.h.
starting at frame i, return the frame index of the first value frame before i. If frame i is a value, return i
Definition at line 647 of file EST_Track.cc.
starting at frame i, return the frame index of the first value frame after i. If frame i is a value, return i
Definition at line 632 of file EST_Track.cc.
ssize_t EST_Track::index | ( | float | t | ) | const |
return the frame index nearest time t
Definition at line 473 of file EST_Track.cc.
ssize_t EST_Track::index_below | ( | float | x | ) | const |
return the frame index before time t
Definition at line 521 of file EST_Track.cc.
|
inline |
return number of frames in track
Definition at line 651 of file EST_Track.h.
|
inline |
return number of frames in track
Definition at line 654 of file EST_Track.h.
|
inline |
return number of channels in track
Definition at line 657 of file EST_Track.h.
|
inline |
return number of auxiliary channels in track
Definition at line 660 of file EST_Track.h.
void EST_Track::add_trailing_breaks | ( | ) |
Definition at line 878 of file EST_Track.cc.
void EST_Track::rm_trailing_breaks | ( | ) |
Definition at line 847 of file EST_Track.cc.
void EST_Track::rm_excess_breaks | ( | ) |
If the contour has multiple break values between sections containing values, reduce the break sections so that each has a single break only.
Definition at line 813 of file EST_Track.cc.
|
inline |
return true if track has equal (i.e. fixed) frame spacing */
Definition at line 670 of file EST_Track.h.
|
inline |
return true if track has only single breaks between value sections
Definition at line 673 of file EST_Track.h.
|
inline |
Definition at line 675 of file EST_Track.h.
|
inline |
Definition at line 676 of file EST_Track.h.
Definition at line 388 of file EST_Track.cc.
Definition at line 331 of file EST_Track.cc.
Definition at line 362 of file EST_Track.cc.
void EST_Track::assign_map | ( | EST_TrackMap::P | map | ) |
Definition at line 1426 of file EST_Track.cc.
|
inline |
Definition at line 692 of file EST_Track.h.
void EST_Track::create_map | ( | EST_ChannelNameMap & | names | ) |
Definition at line 1431 of file EST_Track.cc.
|
inline |
Definition at line 696 of file EST_Track.h.
|
inline |
Definition at line 698 of file EST_Track.h.
int EST_Track::channel_position | ( | EST_ChannelType | type, |
int | offset = 0 |
||
) | const |
Definition at line 1455 of file EST_Track.cc.
float & EST_Track::a | ( | ssize_t | i, |
EST_ChannelType | c, | ||
int | offset = 0 |
||
) |
Definition at line 1465 of file EST_Track.cc.
|
inline |
Definition at line 706 of file EST_Track.h.
float & EST_Track::a | ( | float | t, |
EST_ChannelType | c, | ||
EST_InterpType | interp = it_nearest |
||
) |
Definition at line 1412 of file EST_Track.cc.
|
inline |
Definition at line 711 of file EST_Track.h.
|
inline |
Definition at line 714 of file EST_Track.h.
|
inline |
Definition at line 715 of file EST_Track.h.
|
inline |
Definition at line 717 of file EST_Track.h.
|
inline |
Definition at line 718 of file EST_Track.h.
EST_read_status EST_Track::load_channel_names | ( | const EST_String | name | ) |
Definition at line 1385 of file EST_Track.cc.
EST_write_status EST_Track::save_channel_names | ( | const EST_String | name | ) |
Definition at line 1370 of file EST_Track.cc.
const EST_String EST_Track::channel_name | ( | int | channel, |
const EST_ChannelNameMap & | map, | ||
int | strings_override = 1 |
||
) | const |
Definition at line 138 of file EST_Track.cc.
|
inline |
Definition at line 725 of file EST_Track.h.
|
inline |
Definition at line 728 of file EST_Track.h.
void EST_Track::resize | ( | ssize_t | num_frames, |
EST_TrackMap & | map | ||
) |
Definition at line 1447 of file EST_Track.cc.
|
inline |
Definition at line 733 of file EST_Track.h.
|
inline |
Definition at line 736 of file EST_Track.h.
|
inline |
Definition at line 739 of file EST_Track.h.
|
inlineprotected |
Definition at line 754 of file EST_Track.h.
|
inlineprotected |
Definition at line 755 of file EST_Track.h.
|
inlineprotected |
Definition at line 756 of file EST_Track.h.
|
inlineprotected |
Definition at line 757 of file EST_Track.h.
|
friend |
Definition at line 760 of file EST_Track.h.
|
friend |
Definition at line 761 of file EST_Track.h.
|
friend |
|
protected |
Definition at line 93 of file EST_Track.h.
|
protected |
Definition at line 94 of file EST_Track.h.
|
protected |
Definition at line 95 of file EST_Track.h.
|
protected |
Definition at line 97 of file EST_Track.h.
|
protected |
Definition at line 98 of file EST_Track.h.
|
protected |
Definition at line 100 of file EST_Track.h.
|
protected |
Definition at line 102 of file EST_Track.h.
|
protected |
Definition at line 103 of file EST_Track.h.
|
protected |
Definition at line 105 of file EST_Track.h.
|
protected |
Definition at line 106 of file EST_Track.h.
|
static |
Definition at line 119 of file EST_Track.h.
|
static |
Definition at line 120 of file EST_Track.h.