#include <include/EST_Track.h>
Classes | |
class | IPointer_f |
Public Member Functions | |
Constructor and Destructor functions | |
EST_Track () | |
Default constructor. More... | |
EST_Track (const EST_Track &a) | |
Copy constructor. More... | |
EST_Track (int num_frames, int num_channels) | |
resizing constructor More... | |
EST_Track (int num_frames, EST_StrList &map) | |
resizing constructor | |
~EST_Track () | |
default destructor More... | |
Configuring Tracks | |
void | resize (int num_frames, int num_channels, bool preserve=1) |
void | resize (int 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 (int 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, int 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 (int 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 (int i, int c=0) |
float | a (int i, int c=0) const |
float & | a_no_check (int i, int c=0) |
float | a_no_check (int i, int c=0) const |
float & | a (int i, const char *name, int offset=0) |
float | a (int i, const char *name, int offset=0) const |
float & | a (int i, EST_String name, int offset=0) |
float | a (int 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() (int i, int c) |
float & | operator() (int i) |
float | operator() (int i, int c) const |
float | operator() (int 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 (int i=0) |
return time position of frame i More... | |
float | t (int i=0) const |
float | ms_t (int 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 (int i, int c) |
EST_Val & | aux (int i, int c) const |
EST_Val & | aux (int i, const char *name) |
EST_Val | aux (int i, const char *name) const |
EST_Val & | aux (int i, EST_String name) |
EST_Val | aux (int 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="") |
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) |
Protected Member Functions inherited from EST_Featured | |
EST_Featured (const EST_Featured &f) | |
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) |
Protected Attributes | |
EST_FMatrix | p_values |
EST_FVector | p_times |
EST_CVector | p_is_val |
EST_ValMatrix | p_aux |
EST_StrVector | p_aux_names |
float | p_t_offset |
EST_TrackMap::P | p_map |
EST_StrVector | p_channel_names |
bool | p_equal_space |
bool | p_single_break |
Utility functions | |
typedef EST_Track | Entry |
typedef EST_TIterator< EST_Track, IPointer_f, EST_Track > | Entries |
typedef EST_TRwIterator< EST_Track, IPointer_f, EST_Track > | RwEntries |
class | EST_TIterator< EST_Track, IPointer_f, EST_Track > |
class | EST_TRwIterator< EST_Track, IPointer_f, EST_Track > |
ostream & | operator<< (ostream &s, const EST_Track &tr) |
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) |
int | empty () const |
returns true if no values are set in the frame More... | |
void | set_break (int i) |
set frame i to be a break More... | |
void | set_value (int i) |
set frame i to be a value More... | |
int | val (int i) const |
return true if frame i is a value More... | |
int | track_break (int i) const |
return true if frame i is a break More... | |
int | prev_non_break (int i) const |
int | next_non_break (int i) const |
int | index (float t) const |
return the frame index nearest time t More... | |
int | index_below (float x) const |
return the frame index before time t More... | |
int | num_frames () const |
return number of frames in track More... | |
int | 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) |
EST_Track & | operator= (const EST_Track &a) |
EST_Track & | operator+= (const EST_Track &a) |
EST_Track & | operator|= (const EST_Track &a) |
EST_Track (int 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 (int i, EST_ChannelType c, int offset=0) |
float | a (int 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() (int i, EST_ChannelType c) |
float | operator() (int 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 (int num_frames, EST_TrackMap &map) |
EST_TrackFileType | file_type () const |
void | set_file_type (EST_TrackFileType t) |
bool | has_channel (EST_ChannelType type) const |
Additional Inherited Members | |
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 |
A class for storing time aligned coefficients.
some stuff.
Definition at line 89 of file EST_Track.h.
typedef EST_Track EST_Track::Entry |
Definition at line 763 of file EST_Track.h.
typedef EST_TIterator< EST_Track, IPointer_f, EST_Track > EST_Track::Entries |
Definition at line 764 of file EST_Track.h.
typedef EST_TRwIterator< EST_Track, IPointer_f, EST_Track > EST_Track::RwEntries |
Definition at line 765 of file EST_Track.h.
EST_Track::EST_Track | ( | ) |
Default constructor.
Definition at line 55 of file EST_Track.cc.
EST_Track::EST_Track | ( | const EST_Track & | a | ) |
Copy constructor.
Definition at line 60 of file EST_Track.cc.
EST_Track::EST_Track | ( | int | num_frames, |
int | num_channels | ||
) |
resizing constructor
Definition at line 66 of file EST_Track.cc.
EST_Track::~EST_Track | ( | void | ) |
default destructor
Definition at line 95 of file EST_Track.cc.
EST_Track::EST_Track | ( | int | num_frames, |
EST_TrackMap & | map | ||
) |
Definition at line 81 of file EST_Track.cc.
|
protected |
Definition at line 106 of file EST_Track.cc.
|
protected |
Definition at line 100 of file EST_Track.cc.
|
protected |
Definition at line 913 of file EST_Track.cc.
|
protected |
Definition at line 734 of file EST_Track.cc.
|
protected |
Definition at line 702 of file EST_Track.cc.
|
protected |
Definition at line 768 of file EST_Track.cc.
|
protected |
Definition at line 191 of file EST_Track.cc.
void EST_Track::resize | ( | int | num_frames, |
int | num_channels, | ||
bool | preserve = 1 |
||
) |
resize the track to have {\tt num_frames} and {\tt num_channels}. if {\tt 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 211 of file EST_Track.cc.
void EST_Track::resize | ( | int | num_frames, |
EST_StrList & | map, | ||
bool | preserve = 1 |
||
) |
resize the track to have {\tt num_frames} and {\tt num_channels}. if {\tt 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 283 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 311 of file EST_Track.cc.
|
inline |
Change the number of channels while keeping the number of frames the same. if {\tt 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 169 of file EST_Track.h.
|
inline |
Change the number of frames while keeping the number of channels the same. if {\tt 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 177 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 166 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 171 of file EST_Track.cc.
void EST_Track::copy_setup | ( | const EST_Track & | a | ) |
copy everything but data
Definition at line 202 of file EST_Track.cc.
|
inline |
name of track - redundant use access to features
Definition at line 195 of file EST_Track.h.
|
inline |
set name of track - redundant use access to features
Definition at line 198 of file EST_Track.h.
|
inline |
make {\tt fv} a window to frame {\tt n} in the track.
Definition at line 209 of file EST_Track.h.
|
inline |
make {\tt fv} a window to channel {\tt n} in the track.
Definition at line 214 of file EST_Track.h.
void EST_Track::channel | ( | EST_FVector & | cv, |
const char * | name, | ||
int | startf = 0 , |
||
int | nf = EST_ALL |
||
) |
make {\tt fv} a window to the named channel in the track.
Definition at line 1046 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 {\tt 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 1097 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 {\tt 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 1057 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 {\tt 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 1072 of file EST_Track.cc.
|
inline |
make {\tt 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 285 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 {\tt 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 1136 of file EST_Track.cc.
void EST_Track::copy_sub_track_out | ( | EST_Track & | st, |
const EST_FVector & | frame_times | ||
) | const |
Definition at line 1175 of file EST_Track.cc.
void EST_Track::copy_sub_track_out | ( | EST_Track & | st, |
const EST_IVector & | frame_indices | ||
) | const |
Definition at line 1199 of file EST_Track.cc.
|
inline |
copy channel {\tt n} into pre-allocated buffer buf
Definition at line 310 of file EST_Track.h.
|
inline |
copy channel {\tt n} into EST_FVector
Definition at line 315 of file EST_Track.h.
|
inline |
copy frame {\tt n} into pre-allocated buffer buf
Definition at line 320 of file EST_Track.h.
|
inline |
copy frame {\tt n} into EST_FVector
Definition at line 324 of file EST_Track.h.
|
inline |
copy buf into pre-allocated channel n of track
Definition at line 328 of file EST_Track.h.
|
inline |
copy f into pre-allocated channel n of track
Definition at line 333 of file EST_Track.h.
|
inline |
copy channel buf into pre-allocated channel n of track
Definition at line 338 of file EST_Track.h.
|
inline |
copy buf into frame n of track
Definition at line 345 of file EST_Track.h.
|
inline |
copy t into frame n of track
Definition at line 350 of file EST_Track.h.
|
inline |
copy from into frame n of track
Definition at line 355 of file EST_Track.h.
int EST_Track::channel_position | ( | const char * | name, |
int | offset = 0 |
||
) | const |
Return the position of channel {\tt name} if it exists, otherwise return -1.
Definition at line 392 of file EST_Track.cc.
|
inline |
Return the position of channel {\tt name} if it exists, otherwise return -1.
Definition at line 376 of file EST_Track.h.
|
inline |
Returns true if the track has a channel named {\tt name}, otherwise false.
Definition at line 384 of file EST_Track.h.
|
inline |
Returns true if the track has a channel named {\tt name}, otherwise false.
Definition at line 390 of file EST_Track.h.
float & EST_Track::a | ( | int | i, |
int | c = 0 |
||
) |
return amplitude of frame i, channel c.
Definition at line 1022 of file EST_Track.cc.
float EST_Track::a | ( | int | i, |
int | c = 0 |
||
) | const |
Definition at line 1030 of file EST_Track.cc.
|
inline |
return amplitude of frame i, channel c with no bounds checking.
Definition at line 419 of file EST_Track.h.
|
inline |
Definition at line 420 of file EST_Track.h.
float & EST_Track::a | ( | int | i, |
const char * | name, | ||
int | offset = 0 |
||
) |
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 403 of file EST_Track.cc.
|
inline |
Definition at line 431 of file EST_Track.h.
|
inline |
Definition at line 433 of file EST_Track.h.
|
inline |
Definition at line 435 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 {\tt interp} is set to {\tt 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 {\tt t}. If {\tt interp} is set to {\tt 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 437 of file EST_Track.cc.
|
inline |
Definition at line 450 of file EST_Track.h.
|
inline |
return amplitude of frame i, channel c.
Definition at line 455 of file EST_Track.h.
|
inline |
return amplitude of frame i, channel 0.
Definition at line 457 of file EST_Track.h.
|
inline |
Definition at line 458 of file EST_Track.h.
|
inline |
Definition at line 459 of file EST_Track.h.
|
inline |
return amplitude of frame nearest time t, channel c.
Definition at line 462 of file EST_Track.h.
|
inline |
return amplitude of frame nearest time t, channel 0.
Definition at line 464 of file EST_Track.h.
|
inline |
Definition at line 465 of file EST_Track.h.
|
inline |
Definition at line 466 of file EST_Track.h.
|
inline |
return time position of frame i
Definition at line 477 of file EST_Track.h.
|
inline |
Definition at line 478 of file EST_Track.h.
|
inline |
return time of frame i in milli-seconds.
Definition at line 481 of file EST_Track.h.
void EST_Track::fill_time | ( | float | t, |
int | start = 1 |
||
) |
set frame times to regular intervals of time {\tt t}. The {\tt start} parameter specifies the integer multiple of {\tt t} at which to start. For example, setting this to 0 will start at time 0.0 (The default means the first time value = {\tt t}
Definition at line 786 of file EST_Track.cc.
void EST_Track::fill_time | ( | float | t, |
float | start | ||
) |
set frame times to regular intervals of time {\tt t}. The {\tt start} parameter specifies the first time value.
Definition at line 794 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 802 of file EST_Track.cc.
|
inline |
fill all amplitudes with value {\tt v}
Definition at line 500 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 671 of file EST_Track.cc.
void EST_Track::change_type | ( | float | nshift, |
bool | single_break | ||
) |
REDO.
Definition at line 653 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 599 of file EST_Track.cc.
float EST_Track::start | ( | ) | const |
return time of first value in track
Definition at line 591 of file EST_Track.cc.
float EST_Track::end | ( | ) | const |
return time of last value in track
Definition at line 584 of file EST_Track.cc.
EST_Val & EST_Track::aux | ( | int | i, |
int | c | ||
) |
Definition at line 425 of file EST_Track.cc.
EST_Val & EST_Track::aux | ( | int | i, |
int | c | ||
) | const |
Definition at line 430 of file EST_Track.cc.
EST_Val & EST_Track::aux | ( | int | i, |
const char * | name | ||
) |
Definition at line 415 of file EST_Track.cc.
|
inline |
Definition at line 554 of file EST_Track.h.
|
inline |
Definition at line 557 of file EST_Track.h.
|
inline |
Definition at line 560 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 {\tt 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 {\tt startt} parameter may be specified.
Definition at line 1309 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 {\tt 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 {\tt startt} parameter may be specified.
Definition at line 1275 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 {\tt name} of format {\tt 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 {\tt startt} parameter may be specified.
Definition at line 1345 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 {\tt name} of format {\tt type}.
Definition at line 1230 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 pointer{\tt FP} and write a file of format {\tt type}.
Definition at line 1254 of file EST_Track.cc.
int EST_Track::empty | ( | ) | const |
returns true if no values are set in the frame
Definition at line 1035 of file EST_Track.cc.
void EST_Track::set_break | ( | int | i | ) |
set frame i to be a break
Definition at line 122 of file EST_Track.cc.
void EST_Track::set_value | ( | int | i | ) |
set frame i to be a value
Definition at line 131 of file EST_Track.cc.
int EST_Track::val | ( | int | i | ) | const |
return true if frame i is a value
Definition at line 539 of file EST_Track.cc.
|
inline |
return true if frame i is a break
Definition at line 633 of file EST_Track.h.
int EST_Track::prev_non_break | ( | int | i | ) | const |
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 644 of file EST_Track.cc.
int EST_Track::next_non_break | ( | int | i | ) | const |
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 629 of file EST_Track.cc.
int EST_Track::index | ( | float | t | ) | const |
return the frame index nearest time t
Definition at line 470 of file EST_Track.cc.
int EST_Track::index_below | ( | float | x | ) | const |
return the frame index before time t
Definition at line 518 of file EST_Track.cc.
|
inline |
return number of frames in track
Definition at line 650 of file EST_Track.h.
|
inline |
return number of frames in track
Definition at line 653 of file EST_Track.h.
|
inline |
return number of channels in track
Definition at line 656 of file EST_Track.h.
|
inline |
return number of auxiliary channels in track
Definition at line 659 of file EST_Track.h.
void EST_Track::add_trailing_breaks | ( | ) |
Definition at line 875 of file EST_Track.cc.
void EST_Track::rm_trailing_breaks | ( | ) |
Definition at line 844 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 810 of file EST_Track.cc.
|
inline |
return true if track has equal (i.e. fixed) frame spacing */
Definition at line 669 of file EST_Track.h.
|
inline |
return true if track has only single breaks between value sections
Definition at line 672 of file EST_Track.h.
|
inline |
Definition at line 674 of file EST_Track.h.
|
inline |
Definition at line 675 of file EST_Track.h.
Definition at line 385 of file EST_Track.cc.
Definition at line 328 of file EST_Track.cc.
Definition at line 359 of file EST_Track.cc.
void EST_Track::assign_map | ( | EST_TrackMap::P | map | ) |
Definition at line 1423 of file EST_Track.cc.
|
inline |
Definition at line 691 of file EST_Track.h.
void EST_Track::create_map | ( | EST_ChannelNameMap & | names | ) |
Definition at line 1428 of file EST_Track.cc.
|
inline |
Definition at line 695 of file EST_Track.h.
|
inline |
Definition at line 697 of file EST_Track.h.
int EST_Track::channel_position | ( | EST_ChannelType | type, |
int | offset = 0 |
||
) | const |
Definition at line 1452 of file EST_Track.cc.
float & EST_Track::a | ( | int | i, |
EST_ChannelType | c, | ||
int | offset = 0 |
||
) |
Definition at line 1462 of file EST_Track.cc.
|
inline |
Definition at line 705 of file EST_Track.h.
float & EST_Track::a | ( | float | t, |
EST_ChannelType | c, | ||
EST_InterpType | interp = it_nearest |
||
) |
Definition at line 1409 of file EST_Track.cc.
|
inline |
Definition at line 710 of file EST_Track.h.
|
inline |
Definition at line 713 of file EST_Track.h.
|
inline |
Definition at line 714 of file EST_Track.h.
|
inline |
Definition at line 716 of file EST_Track.h.
|
inline |
Definition at line 717 of file EST_Track.h.
EST_read_status EST_Track::load_channel_names | ( | const EST_String | name | ) |
Definition at line 1382 of file EST_Track.cc.
EST_write_status EST_Track::save_channel_names | ( | const EST_String | name | ) |
Definition at line 1367 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 136 of file EST_Track.cc.
|
inline |
Definition at line 724 of file EST_Track.h.
|
inline |
Definition at line 727 of file EST_Track.h.
void EST_Track::resize | ( | int | num_frames, |
EST_TrackMap & | map | ||
) |
Definition at line 1444 of file EST_Track.cc.
|
inline |
Definition at line 732 of file EST_Track.h.
|
inline |
Definition at line 735 of file EST_Track.h.
|
inline |
Definition at line 738 of file EST_Track.h.
|
inlineprotected |
Definition at line 753 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.
|
friend |
Definition at line 756 of file EST_Track.h.
|
friend |
Definition at line 756 of file EST_Track.h.
|
friend |
Definition at line 176 of file EST_Track.cc.
|
protected |
Definition at line 92 of file EST_Track.h.
|
protected |
Definition at line 93 of file EST_Track.h.
|
protected |
Definition at line 94 of file EST_Track.h.
|
protected |
Definition at line 96 of file EST_Track.h.
|
protected |
Definition at line 97 of file EST_Track.h.
|
protected |
Definition at line 99 of file EST_Track.h.
|
protected |
Definition at line 101 of file EST_Track.h.
|
protected |
Definition at line 102 of file EST_Track.h.
|
protected |
Definition at line 104 of file EST_Track.h.
|
protected |
Definition at line 105 of file EST_Track.h.
|
static |
Definition at line 118 of file EST_Track.h.
|
static |
Definition at line 119 of file EST_Track.h.