112 return fabs(e.
F(
"rise_amp")) + fabs(e.
F(
"fall_amp"));
117 return e.
F(
"rise_dur") + e.
F(
"fall_dur");
122 return (
float)(fabs(e.
F(
"rise_amp")) - fabs(e.
F(
"fall_amp"))) /
123 (float)(fabs(e.
F(
"rise_amp")) + fabs(e.
F(
"fall_amp")));
128 return (
float)(fabs(e.
F(
"rise_dur")) - fabs(e.
F(
"fall_dur"))) /
129 (float)(e.
F(
"rise_dur") + e.
F(
"fall_dur"));
143 return e.
F(
"amp") * (1 + e.
F(
"tilt")) / 2.0;
148 return e.
F(
"dur") * (1 + e.
F(
"tilt")) / 2.0;
153 return -e.
F(
"amp") * (1 - e.
F(
"tilt")) / 2.0;
158 return e.
F(
"dur") * (1 - e.
F(
"tilt")) / 2.0;
184 if (ev.
f(
"intonation_style") !=
"rfc")
185 EST_error(
"Can't create Tilt parameters from intonation style: %s\n",
186 (
const char *)ev.
f.
S(
"intonation_style"));
188 for (e = ev.
head(); e != 0; e = e->
next())
194 ev.
f.
set(
"intonation_style",
"tilt");
211 if (ev.
f(
"intonation_style") !=
"tilt")
212 EST_error(
"Can't create RFC parameters for intonation_style: %s\n",
213 (
const char *)ev.
f.
S(
"intonation_style"));
215 for (e = ev.
head(); e ; e = e->
next())
222 ev.
f.
set(
"intonation_style",
"rfc");
229 for (e = ev.
head(); e; e = e->
next())
231 e->
set(
"ev.f0", (e->
F(
"ev.f0") + shift));
233 e->
set(
"tilt.amp", (e->
F(
"tilt.amp") * scale));
241 for (e = ev.
head(); e; e = e->
next())
245 if ((e->
F(
"rfc.rise_amp") > 0.0) && (e->
F(
"rfc.fall_amp") < 0.0))
246 e->
set(
"rfc.type",
"RISEFALL");
247 else if (e->
F(
"rfc.rise_amp") > 0.0)
248 e->
set(
"rfc.type",
"RISE");
250 e->
set(
"rfc.type",
"FALL");
253 e->
set(
"rfc.type",
"SIL");
263 if (int_lab.
f(
"timing_style") !=
"segment")
264 EST_error(
"Undefined timing style:%s in relation\n",
265 (
const char *)int_lab.
f.
S(
"timing_style"));
267 for (e = int_lab.
head(); e != 0; e = e->
next())
269 e->
set(
"start", start);
273 for (e = int_lab.
head(); e != 0; e = inext)
288 int_lab.
f.
set(
"timing_style",
"unit");
295 e->set(
"start", e->F(
"start"));
301 e->set_function(
"start",
"standard+start");
313 if (ev.
f.
S(
"timing_style") !=
"event")
319 if ((n->
F(
"start") - e->
F(
"end")) > min_length)
323 dummy->
set(
"end", n->
F(
"start"));
346 ev.
f.
set(
"timing_style",
"segment");
356 e->f_remove(
"rfc.rise_amp");
357 e->f_remove(
"rfc.rise_dur");
358 e->f_remove(
"rfc.fall_amp");
359 e->f_remove(
"rfc.fall_dur");
360 e->f_remove(
"rfc.type");
368 e->f_remove(
"tilt.amp");
369 e->f_remove(
"tilt.dur");
370 e->f_remove(
"tilt.tilt");
379 x = (t / (dur)) * 2.0;
381 val = pow(x,
float(2.0));
383 val = 2 - pow((
float(2.0) - x),
float(2.0));
393 float fncurve(
float length,
float t,
float curve)
398 x = (t / length) * 2.0;
403 val = 2 - pow((2 - x), curve);
412 return e.
I(
"int_event", 0);
416 return ((e.
name() ==
"sil") || (e.
name() ==
"SIL"));
420 return ((e.
name() ==
"c") || (e.
name() ==
"C"));
float tilt_to_fall_dur(EST_Features &e)
const EST_String name() const
int I(const EST_String &name) const
float tilt_to_rise_dur(EST_Features &e)
void remove_item(EST_Item *item)
void event_to_segment(EST_Relation &ev, float min_length)
int sil_item(EST_Item &e)
void set(const EST_String &name, ssize_t ival)
int event_item(EST_Item &e)
float tilt_to_fall_amp(EST_Features &e)
void set(const EST_String &name, int ival)
int connection_item(EST_Item &e)
float tilt_to_rise_amp(EST_Features &e)
void remove_tilt_features(EST_Relation &ev)
const EST_String S(const EST_String &path) const
float unit_curve(float amp, float dur, float t)
void remove_rfc_features(EST_Relation &ev)
void tilt_to_rfc(EST_Features &tilt, EST_Features &rfc)
Convert a single set of local tilt parameters to local RFC parameters.
float rfc_to_t_tilt(EST_Features &e)
float F(const EST_String &name) const
void int_segment_to_unit(EST_Relation &int_lab, EST_Relation &ev_lab)
EST_Item * insert_after(EST_Item *li=0)
void scale_tilt(EST_Relation &ev, float shift, float scale)
EST_Features & A(const EST_String &name) const
float fncurve(float length, float t, float curve)
void fill_rfc_types(EST_Relation &ev)
void rfc_to_tilt(EST_Features &rfc, EST_Features &tilt)
Convert a single set of local RFC parameters to local tilt parameters. See RFC to F0 Synthesis for a ...
void fn_start_to_real_start(EST_Relation &ev)
float rfc_to_a_tilt(EST_Features &e)
float start(const EST_Item &item)
float rfc_to_tilt_dur(EST_Features &e)
void set_fn_start(EST_Relation &ev)
float rfc_to_d_tilt(EST_Features &e)
void validate_rfc_stream(EST_Relation &ev)
float tilt_to_peak_f0(EST_Item *e)
float tilt_to_peak_pos(EST_Item *e)
float F(const EST_String &path) const
float rfc_to_tilt_amp(EST_Features &e)
int f_present(const EST_String &name) const