<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>class EST_Window</TITLE> <META NAME="GENERATOR" CONTENT="DOC++ 3.4.6"> </HEAD> <body bgcolor="#ffffff" link="#0000ff" vlink="#dd0000" text="#000088" alink="9000ff"> <A HREF = "http://www.cstr.ed.ac.uk/"> <IMG align=left BORDER=0 SRC = "cstr.gif"></A> <A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html"> <IMG BORDER=0 ALIGN=right SRC="est.jpg" width=150 height=93></A> <br> <br clear=left> <p align=right> In file ../include/sigpr/EST_Window.h:<TABLE BORDER=0><TR> <TD VALIGN=TOP><H2>class <A HREF="#DOC.DOCU">EST_Window</A></H2></TD></H2></TD></TR></TABLE> <BLOCKQUOTE>The EST_Window class provides functions for the creation and use of signal processing windows.</BLOCKQUOTE> <HR> <DL> <P><TABLE> <DT><H3>Public Methods</H3><DD><TR> <TD VALIGN=TOP><A HREF="#DOC.155.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Functions for making windows.</B> <BR> <I></I> <P><TABLE> <TR> <TD VALIGN=TOP><A HREF="#DOC.155.2.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static void </TD><TD><B>make_window</B> (<!1><A HREF="EST_TBuffer.html">EST_TBuffer</A><float> &window_vals, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, const char* <!1><A HREF="EST_Wave.html#DOC.81.5.9">name</A>)<BR> <I>Make a Buffer of containing a window function of specified type.</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.2.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static void </TD><TD><B>make_window</B> (<!1><A HREF="EST_FVector.html">EST_FVector</A> &window_vals, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, const char* <!1><A HREF="EST_Wave.html#DOC.81.5.9">name</A>)<BR> <I>Make a EST_FVector containing a window function of specified type.</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.2.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static <!1><A HREF="EST_Window.html#DOC.155.1">Func</A>* </TD><TD><B>creator</B> (const char* <!1><A HREF="EST_Wave.html#DOC.81.5.9">name</A>, bool report_error = false)<BR> <I>Return the creation function for the given window type</I> </TD></TR></TABLE></P> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Performing windowing on a section of speech. </B> <BR> <I></I> <P><TABLE> <TR> <TD VALIGN=TOP><A HREF="#DOC.155.3.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static void </TD><TD><B>window_signal</B> (const <!1><A HREF="EST_Wave.html">EST_Wave</A> &sig, <!1><A HREF="EST_WindowFunc.html">EST_WindowFunc</A>* <!1><A HREF="EST_Window.html#DOC.155.2.1">make_window</A>, int <!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, <!1><A HREF="EST_TBuffer.html">EST_TBuffer</A><float> &<!1><A HREF="EST_Track.html#DOC.71.4.1">frame</A>)<BR> <I>Window the waveform <TT>sig</TT> starting at point <TT>start</TT> for a duration of <TT>size</TT> samples.</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.3.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static void </TD><TD><B>window_signal</B> (const <!1><A HREF="EST_Wave.html">EST_Wave</A> &sig, <!1><A HREF="EST_WindowFunc.html">EST_WindowFunc</A>* <!1><A HREF="EST_Window.html#DOC.155.2.1">make_window</A>, int <!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, <!1><A HREF="EST_FVector.html">EST_FVector</A> &<!1><A HREF="EST_Track.html#DOC.71.4.1">frame</A>, int <!1><A HREF="EST_TVector.html#DOC.15.1.18">resize</A>=0)<BR> <I>Window the waveform <TT>sig</TT> starting at point <TT>start</TT> for a duration of <TT>size</TT> samples.</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.3.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static void </TD><TD><B>window_signal</B> (const <!1><A HREF="EST_Wave.html">EST_Wave</A> &sig, const <!1><A HREF="EST_String.html">EST_String</A> &window_name, int <!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, <!1><A HREF="EST_FVector.html">EST_FVector</A> &<!1><A HREF="EST_Track.html#DOC.71.4.1">frame</A>, int <!1><A HREF="EST_TVector.html#DOC.15.1.18">resize</A>=0)<BR> <I>Window the waveform <TT>sig</TT> starting at point <TT>start</TT> for a duration of <TT>size</TT> samples.</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.3.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static void </TD><TD><B>window_signal</B> (const <!1><A HREF="EST_Wave.html">EST_Wave</A> &sig, <!1><A HREF="EST_TBuffer.html">EST_TBuffer</A><float> &window_vals, int <!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, <!1><A HREF="EST_FVector.html">EST_FVector</A> &<!1><A HREF="EST_Track.html#DOC.71.4.1">frame</A>, int <!1><A HREF="EST_TVector.html#DOC.15.1.18">resize</A>=0)<BR> <I>Window the waveform <TT>sig</TT> starting at point <TT>start</TT> for a duration of <TT>size</TT> samples.</I> </TD></TR></TABLE></P> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Utility window functions.</B> <BR> <I></I> <P><TABLE> <TR> <TD VALIGN=TOP><A HREF="#DOC.155.4.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static <!1><A HREF="EST_String.html">EST_String</A> </TD><TD><B>description</B> (const char* <!1><A HREF="EST_Wave.html#DOC.81.5.9">name</A>)<BR> <I>Return the description for a given window type</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.4.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static <!1><A HREF="EST_String.html">EST_String</A> </TD><TD><B>options_supported</B> (void)<BR> <I>Return a paragraph describing the available windows</I> </TD></TR><TR> <TD VALIGN=TOP><A HREF="#DOC.155.4.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>static <!1><A HREF="EST_String.html">EST_String</A> </TD><TD><B>options_short</B> (void)<BR> <I>Return a comma separated list of the available window types</I> </TD></TR></TABLE></P> </TD></TR></TABLE></P> <P><TABLE> <DT><H3>Public</H3><DD><TR> <TD VALIGN=TOP><A HREF="#DOC.155.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>typedef <!1><A HREF="EST_WindowFunc.html">EST_WindowFunc</A> </TD><TD><B>Func</B> <BR> <I>A function which creates a window</I> </TD></TR></TABLE></P> </DL> <A NAME="DOC.DOCU"></A> <HR> <H2>Documentation</H2> <BLOCKQUOTE>The EST_Window class provides functions for the creation and use of signal processing windows. <P>Signal processing algorithms often work by on small sections of the speech waveform known as <EM>frames</EM>. A full signal must first be divided into these frames before these algroithms can work. While it would be simple to just "cut out" the required frames from the waveforms, this is usually undesirable as large discontinuities can occur at the frame edges. Instead it is customary to cut out the frame by means of a {em window} function, which tapers the signal in the frame so that it has high values in the middle and low or zero values near the frame edges. The <!1><A HREF="EST_Window.html">EST_Window</A> class provides a wrap around for such windowing operations. <P>There are several types of window function, including: <P><UL> <P><LI> <B>Rectangular</B>, which is used to give a simple copy of the the values between the window limits. <P><BR><CENTER><IMG BORDER=0 SRC=g000026.gif><BR></CENTER> <P><LI> <B>Hanning</B>. The rectangular window can cause sharp discontinuities at window edges. The hanning window solves this by ensuring that the window edges taper to 0. <P><BR><CENTER><IMG BORDER=0 SRC=g000027.gif><BR></CENTER> <P><LI> <B>Hamming.</B> The hanning window causes considerable energy loss, which the hamming window attempts to rectify. <P><BR><CENTER><IMG BORDER=0 SRC=g000028.gif><BR></CENTER> <P></UL> <P>The particular choice of window depends on the application. For instance in most speech synthesis applications Hanning windows are the most suitable as they don't have time domain discontinuities. For analysis applications hamming windows are normally used. <P> For example code, see Windowing <P></BLOCKQUOTE> <DL> <A NAME="Func"></A> <A NAME="DOC.155.1"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef <!1><A HREF="EST_WindowFunc.html">EST_WindowFunc</A> Func</B></TT> <DD>A function which creates a window <DL><DT><DD></DL><P> <A NAME="Functions for making windows."></A> <A NAME="DOC.155.2"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Functions for making windows.</B></TT> <DL><DT><DD></DL><P><DL> <A NAME="make_window"></A> <A NAME="DOC.155.2.1"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static void make_window(<!1><A HREF="EST_TBuffer.html">EST_TBuffer</A><float> &window_vals, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, const char* <!1><A HREF="EST_Wave.html#DOC.81.5.9">name</A>)</B></TT> <DD>Make a Buffer of containing a window function of specified type. <DL><DT><DD></DL><P> <A NAME="make_window"></A> <A NAME="DOC.155.2.2"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static void make_window(<!1><A HREF="EST_FVector.html">EST_FVector</A> &window_vals, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, const char* <!1><A HREF="EST_Wave.html#DOC.81.5.9">name</A>)</B></TT> <DD>Make a EST_FVector containing a window function of specified type. <DL><DT><DD></DL><P> <A NAME="creator"></A> <A NAME="DOC.155.2.3"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static <!1><A HREF="EST_Window.html#DOC.155.1">Func</A>* creator(const char* <!1><A HREF="EST_Wave.html#DOC.81.5.9">name</A>, bool report_error = false)</B></TT> <DD>Return the creation function for the given window type <DL><DT><DD></DL><P></DL> <A NAME="Performing windowing on a section of speech. "></A> <A NAME="DOC.155.3"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Performing windowing on a section of speech. </B></TT> <DL><DT><DD></DL><P><DL> <A NAME="window_signal"></A> <A NAME="DOC.155.3.1"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static void window_signal(const <!1><A HREF="EST_Wave.html">EST_Wave</A> &sig, <!1><A HREF="EST_WindowFunc.html">EST_WindowFunc</A>* <!1><A HREF="EST_Window.html#DOC.155.2.1">make_window</A>, int <!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, <!1><A HREF="EST_TBuffer.html">EST_TBuffer</A><float> &<!1><A HREF="EST_Track.html#DOC.71.4.1">frame</A>)</B></TT> <DD>Window the waveform <TT>sig</TT> starting at point <TT>start</TT> for a duration of <TT>size</TT> samples. The windowing function required is given as a function pointer <TT>*make_window</TT> which has already been created by a function such as <!1><A HREF="EST_Window.html#DOC.155.2.3">creator</A>. The output windowed frame is placed in the buffer <TT>frame</TT> which will have been resized accordingly within the function. <DL><DT><DD></DL><P> <A NAME="window_signal"></A> <A NAME="DOC.155.3.2"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static void window_signal(const <!1><A HREF="EST_Wave.html">EST_Wave</A> &sig, <!1><A HREF="EST_WindowFunc.html">EST_WindowFunc</A>* <!1><A HREF="EST_Window.html#DOC.155.2.1">make_window</A>, int <!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, <!1><A HREF="EST_FVector.html">EST_FVector</A> &<!1><A HREF="EST_Track.html#DOC.71.4.1">frame</A>, int <!1><A HREF="EST_TVector.html#DOC.15.1.18">resize</A>=0)</B></TT> <DD>Window the waveform <TT>sig</TT> starting at point <TT>start</TT> for a duration of <TT>size</TT> samples. The windowing function required is given as a function pointer <TT>*make_window</TT> which has already been created by a function such as <!1><A HREF="EST_Window.html#DOC.155.2.3">creator</A>. The output windowed frame is placed in the EST_FVector <TT>frame</TT>. By default, it is assumed that this is already the correct size (i.e. <TT>size</TT> samples long), but if resizing is required the last argument should be set to 1. <DL><DT><DD></DL><P> <A NAME="window_signal"></A> <A NAME="DOC.155.3.3"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static void window_signal(const <!1><A HREF="EST_Wave.html">EST_Wave</A> &sig, const <!1><A HREF="EST_String.html">EST_String</A> &window_name, int <!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, <!1><A HREF="EST_FVector.html">EST_FVector</A> &<!1><A HREF="EST_Track.html#DOC.71.4.1">frame</A>, int <!1><A HREF="EST_TVector.html#DOC.15.1.18">resize</A>=0)</B></TT> <DD>Window the waveform <TT>sig</TT> starting at point <TT>start</TT> for a duration of <TT>size</TT> samples. The windowing function required is given as a string: this function will make a temporary window of this type. The output windowed frame is placed in the EST_FVector <TT>frame</TT>. By default, it is assumed that this is already the correct size (i.e. <TT>size</TT> samples long), but if resizing is required the last argument should be set to 1. <DL><DT><DD></DL><P> <A NAME="window_signal"></A> <A NAME="DOC.155.3.4"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static void window_signal(const <!1><A HREF="EST_Wave.html">EST_Wave</A> &sig, <!1><A HREF="EST_TBuffer.html">EST_TBuffer</A><float> &window_vals, int <!1><A HREF="EST_Track.html#DOC.71.7.9">start</A>, int <!1><A HREF="EST_String.html#DOC.75.10">size</A>, <!1><A HREF="EST_FVector.html">EST_FVector</A> &<!1><A HREF="EST_Track.html#DOC.71.4.1">frame</A>, int <!1><A HREF="EST_TVector.html#DOC.15.1.18">resize</A>=0)</B></TT> <DD>Window the waveform <TT>sig</TT> starting at point <TT>start</TT> for a duration of <TT>size</TT> samples. The window shape required is given as an array of floats. The output windowed frame is placed in the EST_FVector <TT>frame</TT>. By default, it is assumed that this is already the correct size (i.e. <TT>size</TT> samples long), but if resizing is required the last argument should be set to 1. <DL><DT><DD></DL><P></DL> <A NAME="Utility window functions."></A> <A NAME="DOC.155.4"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Utility window functions.</B></TT> <DL><DT><DD></DL><P><DL> <A NAME="description"></A> <A NAME="DOC.155.4.1"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static <!1><A HREF="EST_String.html">EST_String</A> description(const char* <!1><A HREF="EST_Wave.html#DOC.81.5.9">name</A>)</B></TT> <DD>Return the description for a given window type <DL><DT><DD></DL><P> <A NAME="options_supported"></A> <A NAME="DOC.155.4.2"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static <!1><A HREF="EST_String.html">EST_String</A> options_supported(void)</B></TT> <DD>Return a paragraph describing the available windows <DL><DT><DD></DL><P> <A NAME="options_short"></A> <A NAME="DOC.155.4.3"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>static <!1><A HREF="EST_String.html">EST_String</A> options_short(void)</B></TT> <DD>Return a comma separated list of the available window types <DL><DT><DD></DL><P></DL> </DL> <HR><DL><DT><B>This class has no child classes.</B></DL> <DL><DT><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR> <A HREF = "http://www.ed.ac.uk/"> <IMG align=right BORDER=0 SRC = "edcrest.gif"></A> <P Align=left><I>This page is part of the <A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html"> Edinburgh Speech Tools Library</A> documentation <br> Copyright <A HREF="http://www.ed.ac.uk"> University of Edinburgh</A> 1997 <br> Contact: <A HREF="mailto:speech_toolss@cstr.ed.ac.uk"> speech_tools@cstr.ed.ac.uk </a> </P> <br clear=right>