Loading...
Searching...
No Matches
EST_Track Class Reference

`#include <include/EST_Track.h>`

Inheritance diagram for EST_Track:
[legend]
Collaboration diagram for EST_Track:
[legend]

## Classes

class | IPointer_f

## Public Member Functions

Constructor and Destructor functions
| EST_Track ()
| Default constructor.
| EST_Track (const EST_Track &a)
| Copy constructor.
| EST_Track (int num_frames, int num_channels)
| resizing constructor
| EST_Track (int num_frames, EST_StrList &map)
| resizing constructor
| ~EST_Track ()
| default destructor
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.
void | set_aux_channel_name (const EST_String &name, int channel)
| set the name of the auxiliary channel.
void | copy_setup (const EST_Track &a)
| copy everything but data
Global track information
EST_String | name () const
| name of track - redundant use access to features
void | set_name (const EST_String &n)
| set name of track - redundant use access to features
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
float | t (int i=0) const
float | ms_t (int i) const
| return time of frame i in milli-seconds.
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.
float | shift () const
float | start () const
| return time of first value in track
float | end () const
| return time of last value in track
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
void | set_break (int i)
| set frame i to be a break
void | set_value (int i)
| set frame i to be a value
int | val (int i) const
| return true if frame i is a value
int | track_break (int i) const
| return true if frame i is a break
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
int | index_below (float x) const
| return the frame index before time t
int | num_frames () const
| return number of frames in track
int | length () const
| return number of frames in track
int | num_channels () const
| return number of channels in track
int | num_aux_channels () const
| return number of auxiliary channels in track
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 *‍/
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

## Detailed Description

A class for storing time aligned coefficients.

some stuff.

Definition at line 89 of file EST_Track.h.

## Member Typedef Documentation

## Entry

typedef EST_Track EST_Track::Entry

Definition at line 763 of file EST_Track.h.

## Entries

typedef EST_TIterator< EST_Track, IPointer_f, EST_Track > EST_Track::Entries

Definition at line 764 of file EST_Track.h.

## RwEntries

typedef EST_TRwIterator< EST_Track, IPointer_f, EST_Track > EST_Track::RwEntries

Definition at line 765 of file EST_Track.h.

## Constructor & Destructor Documentation

## EST_Track() [1/4]

EST_Track::EST_Track | ( |  | ) |

Default constructor.

Definition at line 55 of file EST_Track.cc.

## EST_Track() [2/4]

EST_Track::EST_Track | ( | const EST_Track & | a | ) |

Copy constructor.

Definition at line 60 of file EST_Track.cc.

## EST_Track() [3/4]

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::~EST_Track | ( | void |  | ) |

default destructor

Definition at line 95 of file EST_Track.cc.

## EST_Track() [4/4]

EST_Track::EST_Track | ( | int | num_frames,
|  | EST_TrackMap & | map )

Definition at line 81 of file EST_Track.cc.

## Member Function Documentation

## default_vals()

void EST_Track::default_vals | ( | void |  | ) |

protected

Definition at line 106 of file EST_Track.cc.

## default_channel_names()

void EST_Track::default_channel_names | ( |  | ) |

protected

Definition at line 100 of file EST_Track.cc.

## pad_breaks()

void EST_Track::pad_breaks | ( |  | ) |

protected

Definition at line 913 of file EST_Track.cc.

## interp_value()

int EST_Track::interp_value | ( | float | x,
|  | float | f )

protected

Definition at line 734 of file EST_Track.cc.

## interp_amp()

float EST_Track::interp_amp | ( | float | x,
|  | int | c,
|  | float | f )

protected

Definition at line 702 of file EST_Track.cc.

## estimate_shift()

float EST_Track::estimate_shift | ( | float | x | ) |

protected

Definition at line 768 of file EST_Track.cc.

## copy()

void EST_Track::copy | ( | const EST_Track & | a | ) |

protected

Definition at line 191 of file EST_Track.cc.

## resize() [1/3]

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.

## resize() [2/3]

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.

## resize_aux()

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.

## set_num_channels()

void EST_Track::set_num_channels | ( | int | n,
|  | bool | preserve = 1 )

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.

## set_num_frames()

void EST_Track::set_num_frames | ( | int | n,
|  | bool | preserve = 1 )

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.

## set_channel_name()

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.

## set_aux_channel_name()

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.

## copy_setup()

void EST_Track::copy_setup | ( | const EST_Track & | a | ) |

copy everything but data

Definition at line 202 of file EST_Track.cc.

## name()

EST_String EST_Track::name | ( |  | ) | const

inline

name of track - redundant use access to features

Definition at line 195 of file EST_Track.h.

## set_name()

void EST_Track::set_name | ( | const EST_String & | n | ) |

inline

set name of track - redundant use access to features

Definition at line 198 of file EST_Track.h.

## frame()

void EST_Track::frame | ( | EST_FVector & | fv,
|  | int | n,
|  | int | startf = 0,
|  | int | nf = EST_ALL )

inline

make {\tt fv} a window to frame {\tt n} in the track.

Definition at line 209 of file EST_Track.h.

## channel() [1/2]

void EST_Track::channel | ( | EST_FVector & | cv,
|  | int | n,
|  | int | startf = 0,
|  | int | nf = EST_ALL )

inline

make {\tt fv} a window to channel {\tt n} in the track.

Definition at line 214 of file EST_Track.h.

## channel() [2/2]

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.

## sub_track() [1/4]

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.

Parameters

  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.

## sub_track() [2/4]

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.

Parameters

  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.

## sub_track() [3/4]

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.

Parameters

  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.

## sub_track() [4/4]

void EST_Track::sub_track | ( | EST_Track & | st,
|  | int | start_frame = 0,
|  | int | nframes = EST_ALL,
|  | int | start_chan = 0,
|  | int | nchans = EST_ALL ) const

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.

Parameters

  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.

## copy_sub_track()

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.

Parameters

  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.

## copy_sub_track_out() [1/2]

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.

## copy_sub_track_out() [2/2]

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.

## copy_channel_out() [1/2]

void EST_Track::copy_channel_out | ( | int | n,
|  | float * | buf,
|  | int | offset = 0,
|  | int | num = EST_ALL ) const

inline

copy channel {\tt n} into pre-allocated buffer buf

Definition at line 310 of file EST_Track.h.

## copy_channel_out() [2/2]

void EST_Track::copy_channel_out | ( | int | n,
|  | EST_FVector & | f,
|  | int | offset = 0,
|  | int | num = EST_ALL ) const

inline

copy channel {\tt n} into EST_FVector

Definition at line 315 of file EST_Track.h.

## copy_frame_out() [1/2]

void EST_Track::copy_frame_out | ( | int | n,
|  | float * | buf,
|  | int | offset = 0,
|  | int | num = EST_ALL ) const

inline

copy frame {\tt n} into pre-allocated buffer buf

Definition at line 320 of file EST_Track.h.

## copy_frame_out() [2/2]

void EST_Track::copy_frame_out | ( | int | n,
|  | EST_FVector & | f,
|  | int | offset = 0,
|  | int | num = EST_ALL ) const

inline

copy frame {\tt n} into EST_FVector

Definition at line 324 of file EST_Track.h.

## copy_channel_in() [1/3]

void EST_Track::copy_channel_in | ( | int | n,
|  | const float * | buf,
|  | int | offset = 0,
|  | int | num = EST_ALL )

inline

copy buf into pre-allocated channel n of track

Definition at line 328 of file EST_Track.h.

## copy_channel_in() [2/3]

void EST_Track::copy_channel_in | ( | int | n,
|  | const EST_FVector & | f,
|  | int | offset = 0,
|  | int | num = EST_ALL )

inline

copy f into pre-allocated channel n of track

Definition at line 333 of file EST_Track.h.

## copy_channel_in() [3/3]

void EST_Track::copy_channel_in | ( | int | c,
|  | const EST_Track & | from,
|  | int | from_c,
|  | int | from_offset = 0,
|  | int | offset = 0,
|  | int | num = EST_ALL )

inline

copy channel buf into pre-allocated channel n of track

Definition at line 338 of file EST_Track.h.

## copy_frame_in() [1/3]

void EST_Track::copy_frame_in | ( | int | n,
|  | const float * | buf,
|  | int | offset = 0,
|  | int | num = EST_ALL )

inline

copy buf into frame n of track

Definition at line 345 of file EST_Track.h.

## copy_frame_in() [2/3]

void EST_Track::copy_frame_in | ( | int | n,
|  | const EST_FVector & | t,
|  | int | offset = 0,
|  | int | num = EST_ALL )

inline

copy t into frame n of track

Definition at line 350 of file EST_Track.h.

## copy_frame_in() [3/3]

void EST_Track::copy_frame_in | ( | int | i,
|  | const EST_Track & | from,
|  | int | from_f,
|  | int | from_offset = 0,
|  | int | offset = 0,
|  | int | num = EST_ALL )

inline

copy from into frame n of track

Definition at line 355 of file EST_Track.h.

## channel_position() [1/3]

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.

## channel_position() [2/3]

int EST_Track::channel_position | ( | EST_String | name,
|  | int | offset = 0 ) const

inline

Return the position of channel {\tt name} if it exists, otherwise return -1.

Definition at line 376 of file EST_Track.h.

## has_channel() [1/3]

bool EST_Track::has_channel | ( | const char * | name | ) | const

inline

Returns true if the track has a channel named {\tt name}, otherwise false.

Definition at line 384 of file EST_Track.h.

## has_channel() [2/3]

bool EST_Track::has_channel | ( | EST_String | name | ) | const

inline

Returns true if the track has a channel named {\tt name}, otherwise false.

Definition at line 390 of file EST_Track.h.

## a() [1/12]

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.

## a() [2/12]

float EST_Track::a | ( | int | i,
|  | int | c = 0 ) const

Definition at line 1030 of file EST_Track.cc.

## a_no_check() [1/2]

float & EST_Track::a_no_check | ( | int | i,
|  | int | c = 0 )

inline

return amplitude of frame i, channel c with no bounds checking.

Definition at line 419 of file EST_Track.h.

## a_no_check() [2/2]

float EST_Track::a_no_check | ( | int | i,
|  | int | c = 0 ) const

inline

Definition at line 420 of file EST_Track.h.

## a() [3/12]

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.

## a() [4/12]

float EST_Track::a | ( | int | i,
|  | const char * | name,
|  | int | offset = 0 ) const

inline

Definition at line 431 of file EST_Track.h.

## a() [5/12]

float & EST_Track::a | ( | int | i,
|  | EST_String | name,
|  | int | offset = 0 )

inline

Definition at line 433 of file EST_Track.h.

## a() [6/12]

float EST_Track::a | ( | int | i,
|  | EST_String | name,
|  | int | offset = 0 ) const

inline

Definition at line 435 of file EST_Track.h.

## a() [7/12]

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.

## a() [8/12]

float EST_Track::a | ( | float | t,
|  | int | c = 0,
|  | EST_InterpType | interp = it_nearest ) const

inline

Definition at line 450 of file EST_Track.h.

## operator()() [1/10]

float & EST_Track::operator() | ( | int | i,
|  | int | c )

inline

return amplitude of frame i, channel c.

Definition at line 455 of file EST_Track.h.

## operator()() [2/10]

float & EST_Track::operator() | ( | int | i | ) |

inline

return amplitude of frame i, channel 0.

Definition at line 457 of file EST_Track.h.

## operator()() [3/10]

float EST_Track::operator() | ( | int | i,
|  | int | c ) const

inline

Definition at line 458 of file EST_Track.h.

## operator()() [4/10]

float EST_Track::operator() | ( | int | i | ) | const

inline

Definition at line 459 of file EST_Track.h.

## operator()() [5/10]

float & EST_Track::operator() | ( | float | t,
|  | int | c )

inline

return amplitude of frame nearest time t, channel c.

Definition at line 462 of file EST_Track.h.

## operator()() [6/10]

float & EST_Track::operator() | ( | float | t | ) |

inline

return amplitude of frame nearest time t, channel 0.

Definition at line 464 of file EST_Track.h.

## operator()() [7/10]

float EST_Track::operator() | ( | float | t,
|  | int | c ) const

inline

Definition at line 465 of file EST_Track.h.

## operator()() [8/10]

float EST_Track::operator() | ( | float | t | ) | const

inline

Definition at line 466 of file EST_Track.h.

## t() [1/2]

float & EST_Track::t | ( | int | i = 0 | ) |

inline

return time position of frame i

Definition at line 477 of file EST_Track.h.

## t() [2/2]

float EST_Track::t | ( | int | i = 0 | ) | const

inline

Definition at line 478 of file EST_Track.h.

## ms_t()

float EST_Track::ms_t | ( | int | i | ) | const

inline

return time of frame i in milli-seconds.

Definition at line 481 of file EST_Track.h.

## fill_time() [1/3]

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.

## fill_time() [2/3]

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.

## fill_time() [3/3]

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.

## fill()

void EST_Track::fill | ( | float | v | ) |

inline

fill all amplitudes with value {\tt v}

Definition at line 500 of file EST_Track.h.

## sample()

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.

## change_type()

void EST_Track::change_type | ( | float | nshift,
|  | bool | single_break )

REDO.

Definition at line 653 of file EST_Track.cc.

## shift()

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.

## start()

float EST_Track::start | ( |  | ) | const

return time of first value in track

Definition at line 591 of file EST_Track.cc.

## end()

float EST_Track::end | ( |  | ) | const

return time of last value in track

Definition at line 584 of file EST_Track.cc.

## aux() [1/6]

EST_Val & EST_Track::aux | ( | int | i,
|  | int | c )

Definition at line 425 of file EST_Track.cc.

## aux() [2/6]

EST_Val & EST_Track::aux | ( | int | i,
|  | int | c ) const

Definition at line 430 of file EST_Track.cc.

## aux() [3/6]

EST_Val & EST_Track::aux | ( | int | i,
|  | const char * | name )

Definition at line 415 of file EST_Track.cc.

## aux() [4/6]

EST_Val EST_Track::aux | ( | int | i,
|  | const char * | name ) const

inline

Definition at line 554 of file EST_Track.h.

## aux() [5/6]

EST_Val & EST_Track::aux | ( | int | i,
|  | EST_String | name )

inline

Definition at line 557 of file EST_Track.h.

## aux() [6/6]

EST_Val EST_Track::aux | ( | int | i,
|  | EST_String | name ) const

inline

Definition at line 560 of file EST_Track.h.

## load() [1/3]

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.

## load() [2/3]

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.

## load() [3/3]

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.

## save() [1/2]

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.

## save() [2/2]

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.

## empty()

int EST_Track::empty | ( |  | ) | const

returns true if no values are set in the frame

Definition at line 1035 of file EST_Track.cc.

## set_break()

void EST_Track::set_break | ( | int | i | ) |

set frame i to be a break

Definition at line 122 of file EST_Track.cc.

## set_value()

void EST_Track::set_value | ( | int | i | ) |

set frame i to be a value

Definition at line 131 of file EST_Track.cc.

## val()

int EST_Track::val | ( | int | i | ) | const

return true if frame i is a value

Definition at line 539 of file EST_Track.cc.

## track_break()

int EST_Track::track_break | ( | int | i | ) | const

inline

return true if frame i is a break

Definition at line 633 of file EST_Track.h.

## prev_non_break()

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.

## next_non_break()

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.

## index()

int EST_Track::index | ( | float | t | ) | const

return the frame index nearest time t

Definition at line 470 of file EST_Track.cc.

## index_below()

int EST_Track::index_below | ( | float | x | ) | const

return the frame index before time t

Definition at line 518 of file EST_Track.cc.

## num_frames()

int EST_Track::num_frames | ( |  | ) | const

inline

return number of frames in track

Definition at line 650 of file EST_Track.h.

## length()

int EST_Track::length | ( |  | ) | const

inline

return number of frames in track

Definition at line 653 of file EST_Track.h.

## num_channels()

int EST_Track::num_channels | ( |  | ) | const

inline

return number of channels in track

Definition at line 656 of file EST_Track.h.

## num_aux_channels()

int EST_Track::num_aux_channels | ( |  | ) | const

inline

return number of auxiliary channels in track

Definition at line 659 of file EST_Track.h.

## add_trailing_breaks()

void EST_Track::add_trailing_breaks | ( |  | ) |

Definition at line 875 of file EST_Track.cc.

## rm_trailing_breaks()

void EST_Track::rm_trailing_breaks | ( |  | ) |

Definition at line 844 of file EST_Track.cc.

## rm_excess_breaks()

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.

## equal_space()

bool EST_Track::equal_space | ( |  | ) | const

inline

return true if track has equal (i.e. fixed) frame spacing *‍/

Definition at line 669 of file EST_Track.h.

## single_break()

bool EST_Track::single_break | ( |  | ) | const

inline

return true if track has only single breaks between value sections

Definition at line 672 of file EST_Track.h.

## set_equal_space()

void EST_Track::set_equal_space | ( | bool | t | ) |

inline

Definition at line 674 of file EST_Track.h.

## set_single_break()

void EST_Track::set_single_break | ( | bool | t | ) |

inline

Definition at line 675 of file EST_Track.h.

## operator=()

EST_Track & EST_Track::operator= | ( | const EST_Track & | a | ) |

Definition at line 385 of file EST_Track.cc.

## operator+=()

EST_Track & EST_Track::operator+= | ( | const EST_Track & | a | ) |

Definition at line 328 of file EST_Track.cc.

## operator|=()

EST_Track & EST_Track::operator|= | ( | const EST_Track & | a | ) |

Definition at line 359 of file EST_Track.cc.

## assign_map() [1/2]

void EST_Track::assign_map | ( | EST_TrackMap::P | map | ) |

Definition at line 1423 of file EST_Track.cc.

## assign_map() [2/2]

void EST_Track::assign_map | ( | EST_TrackMap & | map | ) |

inline

Definition at line 691 of file EST_Track.h.

## create_map() [1/2]

void EST_Track::create_map | ( | EST_ChannelNameMap & | names | ) |

Definition at line 1428 of file EST_Track.cc.

## create_map() [2/2]

void EST_Track::create_map | ( | void |  | ) |

inline

Definition at line 695 of file EST_Track.h.

## map()

EST_TrackMap::P EST_Track::map | ( |  | ) | const

inline

Definition at line 697 of file EST_Track.h.

## channel_position() [3/3]

int EST_Track::channel_position | ( | EST_ChannelType | type,
|  | int | offset = 0 ) const

Definition at line 1452 of file EST_Track.cc.

## a() [9/12]

float & EST_Track::a | ( | int | i,
|  | EST_ChannelType | c,
|  | int | offset = 0 )

Definition at line 1462 of file EST_Track.cc.

## a() [10/12]

float EST_Track::a | ( | int | i,
|  | EST_ChannelType | c,
|  | int | offset = 0 ) const

inline

Definition at line 705 of file EST_Track.h.

## a() [11/12]

float & EST_Track::a | ( | float | t,
|  | EST_ChannelType | c,
|  | EST_InterpType | interp = it_nearest )

Definition at line 1409 of file EST_Track.cc.

## a() [12/12]

float EST_Track::a | ( | float | t,
|  | EST_ChannelType | c,
|  | EST_InterpType | interp = it_nearest ) const

inline

Definition at line 710 of file EST_Track.h.

## operator()() [9/10]

float & EST_Track::operator() | ( | int | i,
|  | EST_ChannelType | c )

inline

Definition at line 713 of file EST_Track.h.

## operator()() [10/10]

float EST_Track::operator() | ( | int | i,
|  | EST_ChannelType | c ) const

inline

Definition at line 714 of file EST_Track.h.

## t_offset() [1/2]

float & EST_Track::t_offset | ( |  | ) |

inline

Definition at line 716 of file EST_Track.h.

## t_offset() [2/2]

float EST_Track::t_offset | ( |  | ) | const

inline

Definition at line 717 of file EST_Track.h.

## load_channel_names()

EST_read_status EST_Track::load_channel_names | ( | const EST_String | name | ) |

Definition at line 1382 of file EST_Track.cc.

## save_channel_names()

EST_write_status EST_Track::save_channel_names | ( | const EST_String | name | ) |

Definition at line 1367 of file EST_Track.cc.

## channel_name() [1/2]

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.

## channel_name() [2/2]

const EST_String EST_Track::channel_name | ( | int | channel,
|  | int | strings_override = 1 ) const

inline

Definition at line 724 of file EST_Track.h.

## aux_channel_name()

const EST_String EST_Track::aux_channel_name | ( | int | channel | ) | const

inline

Definition at line 727 of file EST_Track.h.

## resize() [3/3]

void EST_Track::resize | ( | int | num_frames,
|  | EST_TrackMap & | map )

Definition at line 1444 of file EST_Track.cc.

## file_type()

EST_TrackFileType EST_Track::file_type | ( |  | ) | const

inline

Definition at line 732 of file EST_Track.h.

## set_file_type()

void EST_Track::set_file_type | ( | EST_TrackFileType | t | ) |

inline

Definition at line 735 of file EST_Track.h.

## has_channel() [3/3]

bool EST_Track::has_channel | ( | EST_ChannelType | type | ) | const

inline

Definition at line 738 of file EST_Track.h.

## point_to_first()

void EST_Track::point_to_first | ( | IPointer_f & | ip | ) | const

inline protected

Definition at line 753 of file EST_Track.h.

## move_pointer_forwards()

void EST_Track::move_pointer_forwards | ( | IPointer_f & | ip | ) | const

inline protected

Definition at line 754 of file EST_Track.h.

## points_to_something()

bool EST_Track::points_to_something | ( | const IPointer_f & | ip | ) | const

inline protected

Definition at line 755 of file EST_Track.h.

## points_at()

EST_Track & EST_Track::points_at | ( | const IPointer_f & | ip | ) |

inline protected

Definition at line 756 of file EST_Track.h.

## Friends And Related Symbol Documentation

## EST_TIterator< EST_Track, IPointer_f, EST_Track >

friend class EST_TIterator< EST_Track, IPointer_f, EST_Track >

friend

Definition at line 756 of file EST_Track.h.

## EST_TRwIterator< EST_Track, IPointer_f, EST_Track >

friend class EST_TRwIterator< EST_Track, IPointer_f, EST_Track >

friend

Definition at line 756 of file EST_Track.h.

## operator<<

ostream & operator<< | ( | ostream & | s,
|  | const EST_Track & | tr )

friend

Definition at line 176 of file EST_Track.cc.

## Member Data Documentation

## p_values

EST_FMatrix EST_Track::p_values

protected

Definition at line 92 of file EST_Track.h.

## p_times

EST_FVector EST_Track::p_times

protected

Definition at line 93 of file EST_Track.h.

## p_is_val

EST_CVector EST_Track::p_is_val

protected

Definition at line 94 of file EST_Track.h.

## p_aux

EST_ValMatrix EST_Track::p_aux

protected

Definition at line 96 of file EST_Track.h.

## p_aux_names

EST_StrVector EST_Track::p_aux_names

protected

Definition at line 97 of file EST_Track.h.

## p_t_offset

float EST_Track::p_t_offset

protected

Definition at line 99 of file EST_Track.h.

## p_map

EST_TrackMap::P EST_Track::p_map

protected

Definition at line 101 of file EST_Track.h.

## p_channel_names

EST_StrVector EST_Track::p_channel_names

protected

Definition at line 102 of file EST_Track.h.

## p_equal_space

bool EST_Track::p_equal_space

protected

Definition at line 104 of file EST_Track.h.

## p_single_break

bool EST_Track::p_single_break

protected

Definition at line 105 of file EST_Track.h.

## default_frame_shift

const float EST_Track::default_frame_shift =0.005

static

Definition at line 118 of file EST_Track.h.

## default_sample_rate

const int EST_Track::default_sample_rate =16000

static

Definition at line 119 of file EST_Track.h.

The documentation for this class was generated from the following files:

- include/EST_Track.h
- speech_class/EST_Track.cc