43 #ifndef __EST_TRACK_AUX_H__ 
   44 #define __EST_TRACK_AUX_H__ 
   46 #include "EST_FMatrix.h" 
   47 #include "EST_TList.h" 
   48 #include "ling_class/EST_Relation.h" 
   49 #include "EST_Option.h" 
   50 #include "EST_Track.h" 
   51 #include "EST_TBuffer.h" 
   54 void time_med_smooth(
EST_Track &c, 
float x);
 
   55 void time_mean_smooth(
EST_Track &c, 
float x);
 
   56 void simple_med_smooth(
EST_Track &c, 
int n, 
int channel=0);
 
   57 void simple_mean_smooth(
EST_Track &c, 
int n, 
int channel=0);
 
   68 void normalise(
EST_Track &tr, 
float mean, 
float sd, 
int channel, 
 
   69            float upper, 
float lower);
 
   71            float upper, 
float lower);
 
   87 float mean( 
const EST_Track &a, 
int channel );
 
   90 void meansd(
EST_Track &a, 
float &m, 
float &sd, 
int channel);
 
  114 void align_to_track(
EST_Track &tr, 
float &start, 
float &end);
 
  116 void align_to_track(
EST_Track &tr, 
int &start, 
int &end, 
int sample_rate);
 
  119             int &start, 
int &end, 
 
  120             int sample_rate, 
float offset=0.0);
 
  122 int nearest_boundary(
EST_Track &tr, 
float time, 
int sample_rate, 
float offset=0);
 
  125 void set_start(
EST_Track &tr, 
float start);
 
  127 void move_start(
EST_Track &tr, 
float shift);
 
  137 EST_String options_track_filetypes_long(
void);
 
  155 float get_time_frame_size(
EST_Track &pms, 
int i, 
int prefer_prev = 0);
 
  169 int get_frame_size(
EST_Track &pms, 
int current_pos, 
int sample_rate, 
 
  174 int get_order(
const EST_Track &t, EST_CoefficientType type, 
int d=0);
 
  180         int start_frame=0, 
int end_frame=-1);
 
  183 void get_start_positions(
const EST_Track &t, 
 
  198 static inline void get_frame(
const EST_Track &tr, 
int sample_rate,
 
  200                  int &start, 
int ¢er, 
int &end)
 
  202   center = (int)(tr.
t(f)*sample_rate + 0.5);
 
  203   start  = center - (int)(tr.
a(f, channel_length)/2.0);
 
  204   end    = start + (int)(tr.
a(f, channel_length));
 
  208 static inline void get_frame(
const EST_Track &tr, 
int sample_rate,
 
  210                  float &start, 
float ¢er, 
float &end)
 
  213   start  = center - tr.
a(f, channel_length)/(float)sample_rate/2.0;
 
  214   end    = start + tr.
a(f, channel_length)/(float)sample_rate;
 
  218 static inline void get_frame_o(
const EST_Track &tr, 
int sample_rate,
 
  220                    int &start, 
int ¢er, 
int &end)
 
  222   center = (int)(tr.
t(f)*sample_rate + tr.
a(f,channel_offset) + 0.5);
 
  223   start  = center - (int)(tr.
a(f, channel_length)/2.0);
 
  224   end    = start + (int)(tr.
a(f, channel_length));
 
  228 static inline void get_frame_o(
const EST_Track &tr, 
int sample_rate,
 
  230                    float &start, 
float ¢er, 
float &end)
 
  232   center = tr.
t(f) + tr.
a(f,channel_offset)/(float)sample_rate;
 
  233   start  = center - tr.
a(f, channel_length)/(float)sample_rate/2.0;
 
  234   end    = start + tr.
a(f, channel_length)/(float)sample_rate;
 
  240 void channel_to_time(
EST_Track &tr, 
int channel, 
float scale=1.0);
 
  241 void channel_to_time(
EST_Track &tr, EST_ChannelType c,
float  scale=1.0);
 
  244 void channel_to_time_lengths(
EST_Track &tr, 
int channel, 
float scale=1.0);
 
  245 void channel_to_time_lengths(
EST_Track &tr, EST_ChannelType c,
float  scale=1.0);