Sound Sound_Formant_filter (Sound me, Formant formant) { try { autoFormantGrid grid = Formant_downto_FormantGrid (formant); autoSound thee = Sound_FormantGrid_filter (me, grid.peek()); return thee.transfer(); } catch (MelderError) { Melder_throw (me, ": not filtered with ", formant, "."); } }
Sound Sound_Formant_filter (Sound me, Formant formant) { Sound thee = NULL; FormantGrid grid = NULL; //start: grid = Formant_downto_FormantGrid (formant); cherror thee = Sound_FormantGrid_filter (me, grid); cherror end: forget (grid); return thee; }