40 #include "EST_cmd_line.h"
42 #include "EST_Track.h"
43 #include "ling_class/EST_relation_aux.h"
50 int main (
int argc,
char *argv[])
60 const float default_frame_shift = 0.01;
64 EST_String(
"[input label file] -o [output file] [options]") +
65 "Summary: generate F0 file from tilt or RFC label file\n"
66 "use \"-\" to make input and output files stdin/out\n"
67 "-h Options help\n\n"+
68 "-noconn Synthesize events only - no connections in output\n"
69 "-o <ofile> Output F0 file\n"
70 "-otype <string> File type for output label file\n"
71 "-event_names <string> List of labels to be classed as events. \n"
72 " Lists are specified as quoted strings with spaces \n"
73 " separating each item, e.g.: \"a b c d\"\n\n"
74 "-s <float> Frame spacing of generated contour in seconds\n",
85 for (e = ev.
head(); e; e = e->next())
87 e->
set(
"start", prev_end);
88 prev_end = e->
F(
"end");
91 pstring = al.
present(
"-event_names") ? al.
val(
"-event_names"):
95 convert_to_broad(ev, event_list,
"int_event");
96 shift = al.
present(
"-s") ? al.
fval(
"-s") : default_frame_shift;
98 if (ev.
f(
"intonation_style") ==
"tilt")
110 fz.
save(out_file, al.
val(
"-otype"));
A class for storing digital waveforms. The waveform is stored as an array of 16 bit shorts...
const T & first() const
return const reference to first item in list
int override_val(const EST_String rkey, const EST_String rval)
add to end of list or overwrite. If rval is empty, do nothing
void set_channel_name(const EST_String &name, int channel)
set the name of the channel.
float fval(const EST_String &rkey, int m=1) const
void rfc_synthesis(EST_Track &f0, EST_Relation &ev_list, float f_shift, int no_conn)
Generate an F0 contour given a list RFC events.
void set(const EST_String &name, int ival)
void StringtoStrList(EST_String s, EST_StrList &l, EST_String sep)
Convert a EST_String to a EST_StrList by separating tokens in s delimited by the separator sep...
EST_write_status save(const EST_String name, const EST_String EST_filetype="")
void tilt_synthesis(EST_Track &track, EST_Relation &ev_list, float f_shift, int no_conn)
Generate an F0 contour given a list Tilt events.
const int present(const K &rkey) const
Returns true if key is present.
const V & val(const K &rkey, bool m=0) const
return value according to key (const)
EST_read_status load(const EST_String &filename, const EST_String &type="esps")
const float F(const EST_String &name) const
Utility EST_String Functions header file.