| 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)
resize the track to have num_frames and num_channels.
|
void | resize (int num_frames, EST_StrList &map, bool preserve = 1)
resize the track to have num_frames and num_channels.
|
void | resize_aux (EST_StrList &map, bool preserve = 1)
resize the track's auxiliary channels
|
void | set_num_channels (int n, bool preserve = 1)
Change the number of channels while keeping the number of frames the same.
|
void | set_num_frames (int n, bool preserve = 1)
Change the number of frames while keeping the number of channels the same.
|
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)
make fv a window to frame n in the track.
|
void | channel (EST_FVector &cv, int n, int startf=0, int nf=EST_ALL)
make fv a window to channel n in the track.
|
void | 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.
|
void | 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.
|
void | 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.
|
void | sub_track (EST_Track &st, int start_frame=0, int nframes=EST_ALL, int start_chan=0, int nchans=EST_ALL) const
make st refer to a portion of the track.make st refer to a portion of the track.
|
void | 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.
|
void | copy_channel_out (int n, float* buf, int offset=0, int num=EST_ALL) const
copy channel n into pre-allocated buffer buf
|
void | copy_frame_out (int n, float* buf, int offset=0, int num=EST_ALL) const
copy frame n into pre-allocated buffer buf
|
void | copy_frame_out (int n, EST_FVector &f, int offset=0, int num=EST_ALL) const
copy frame n into EST_FVector
|
void | copy_channel_in (int n, const float* buf, int offset=0, int num=EST_ALL)
copy buf into pre-allocated channel n of track
|
void | copy_channel_in (int c, const EST_Track &from, int from_c, int from_offset=0, int offset=0, int num=EST_ALL)
copy channel buf into pre-allocated channel n of track
|
void | copy_frame_in (int n, const float* buf, int offset=0, int num=EST_ALL)
copy buf into frame n of track
|
void | copy_frame_in (int n, const EST_FVector &t, int offset=0, int num=EST_ALL)
copy t into frame n of track
|
void | copy_frame_in (int i, const EST_Track &from, int from_f, int from_offset=0, int offset=0, int num=EST_ALL)
copy from into frame n of track
|
|
| Channel information
int | channel_position (const char* name, int offset=0) const
Return the position of channel name if it exists, otherwise return -1
|
int | channel_position (EST_String name, int offset=0) const
Return the position of channel name if it exists, otherwise return -1
|
bool | has_channel (const char* name) const
Returns true if the track has a channel named name, otherwise false
|
bool | has_channel (EST_String name) const
Returns true if the track has a channel named name, otherwise false
|
|
| Accessing amplitudes The following functions can be used
float& | a (int i, int c=0)
return amplitude of frame i, channel c
|
float& | a_no_check (int i, int c=0)
return amplitude of frame i, channel c with no bounds checking.
|
float& | a (int i, const char* name, int offset=0)
return amplitude of point i, in the channel named name plus offset.
|
float& | a (float t, int c=0, EST_InterpType interp=it_nearest)
return amplitude of time t, channel c.
|
float& | operator() (int i, int c)
return amplitude of frame i, channel c.
|
float& | operator() (int i)
return amplitude of frame i, channel 0.
|
float& | operator() (float t, int c)
return amplitude of frame nearest time t, channel c.
|
float& | operator() (float t)
return amplitude of frame nearest time t, channel 0.
|
|
| Timing
float& | t (int i=0)
return time position of frame i
|
float | ms_t (int i) const
return time of framet i in milli-seconds
|
void | fill_time (float t, int start =1)
set frame times to regular intervals of time t
|
void | fill_time (EST_Track &t)
fill times with times of other track
|
void | fill (float v)
fill all amplitudes with value v
|
void | sample (float shift)
resample track at this frame shift, specified in seconds.
|
void | change_type (float nshift, bool single_break)
REDO
|
float | shift () const
return an estimation of the frame spacing in seconds.
|
float | start () const
return time of first value in track
|
float | end () const
return time of last value in track
|
|
| File i/o functions
|
| Utility functions
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
starting at frame i, return the frame index of the first value frame before i.
|
int | next_non_break (int i) const
starting at frame i, return the frame index of the first value frame after i.
|
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 | 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.
|
bool | equal_space () const
return true if track has equal (ie.
|
bool | single_break () const
return true if track has only single breaks between value sections
|
|