<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>class EST_SingleChannelWave</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/EST_SingleChannelWave.h:<TABLE BORDER=0><TR> <TD VALIGN=TOP><H2>class <A HREF="#DOC.DOCU">EST_SingleChannelWave</A></H2></TD></H2></TD></TR></TABLE> <BLOCKQUOTE>An alias for wave which can be used to tell the compiler you know it is a simple one channel wave.</BLOCKQUOTE> <HR> <H2>Inheritance:</H2> <APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=95> <param name=classes value="CEST_Featured,MEST_Featured.html,CEST_Wave,MEST_Wave.html,CEST_SingleChannelWave,MEST_SingleChannelWave.html"> <param name=before value="M,M,M"> <param name=after value="Md_SP,Md_,M"> <param name=indent value="0,1,2"> <param name=arrowdir value="down"> </APPLET> <HR> <DL> <P><TABLE> <DT><H3>Public Methods</H3><DD><TR> <TD VALIGN=TOP><A HREF="#DOC.82.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_SingleChannelWave</B> ()<BR> <I>default constructor</I> </TD></TR></TABLE></P> </DL> <HR><H3>Inherited from <A HREF="EST_Wave.html">EST_Wave</A>:</H3> <DL> <P><DL> <DT><H3>Public Methods</H3><DD><DT> <P> <B>Access functions for finding ampltiudes of samples </B> <P><DL> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>short& <B><A HREF="#DOC.81.4.1">a</A></B>(int i, int <!1><A HREF="EST_Track.html#DOC.71.4.2">channel</A> = 0) <DD><I>return amplitude of sample <tt>i</tt> from channel <tt> channel</tt>.</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>short <B><A HREF="#DOC.81.4.2">operator()</A></B>(int i, int <!1><A HREF="EST_Track.html#DOC.71.4.2">channel</A>) const <DD><I>return amplitude of sample <tt>i</tt> from channel <tt> channel</tt>.</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>short <B><A HREF="#DOC.81.4.3">operator()</A></B>(int i) const <DD><I>return amplitude of sample <tt>i</tt> from channel 0.</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>short& <B><A HREF="#DOC.81.4.4">a_safe</A></B>(int i, int <!1><A HREF="EST_Track.html#DOC.71.4.2">channel</A> = 0) <DD><I>Version of a() that returns zero if index is out of array bounds.</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>float <B><A HREF="#DOC.81.4.5">t</A></B>(int i) const <DD><I>return the time position in seconds of the ith sample</I> </DL></P> <DT> <P> <B>Information functions </B> <P><DL> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.81.5.1">num_samples</A></B>() const <DD><I>return the number of samples in the waveform</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.81.5.2">num_channels</A></B>() const <DD><I>return the number of channels in the waveform</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.81.5.3">sample_rate</A></B>() const <DD><I>return the sampling rate (frequency)</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.81.5.4">set_sample_rate</A></B>(const int <!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>) <DD><I>Set sampling rate to <tt>n</tt></I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>int <B><A HREF="#DOC.81.5.5">length</A></B>() const <DD><I>return the size of the waveform, ie.</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>float <B><A HREF="#DOC.81.5.6">end</A></B>() <DD><I>return the time position of the last sample</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool <B><A HREF="#DOC.81.5.7">have_left_context</A></B>(unsigned int <!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>) const <DD><I>Can we look N samples to the left?</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.81.5.8">sample_type</A></B>() const <DD><I>returns the file format of the file from which the waveform was read.</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_String.html">EST_String</A> <B><A HREF="#DOC.81.5.9">name</A></B>() const <DD><I>A string indentifying the waveform, commonly used to store the filename</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.81.5.10">set_name</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> <!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>) <DD><I>Sets name</I> </DL></P> <DT> <P> <B>Waveform manipulation functions </B> <P><DL> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.81.6.1">resize</A></B>(int <!1><A HREF="EST_Wave.html#DOC.81.5.1">num_samples</A>, int <!1><A HREF="EST_Wave.html#DOC.81.5.2">num_channels</A> = EST_ALL, int <!1><A HREF="set.html">set</A>=1) <DD><I>resize the waveform </I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.81.6.2">resample</A></B>(int rate) <DD><I>Resample waveform to <tt>rate</tt></I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.81.6.3">rescale</A></B>(float gain, int normalize=0) <DD><I>multiply all samples by a factor <tt>gain</tt>.</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.81.6.4">clear</A></B>() <DD><I>clear waveform and set size to 0</I> </DL></P> <DT> <P> <B>File i/o functions </B> <P><DL> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_read_status.html">EST_read_status</A> <B><A HREF="#DOC.81.7.1">load</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> <!1><A HREF="EST_TokenStream.html#DOC.10.7.9">filename</A>, int offset=0, int <!1><A HREF="EST_Wave.html#DOC.81.5.5">length</A> = 0, int rate = default_sample_rate) <DD><I>Load a file into the waveform.</I> <DT> <IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="EST_read_status.html">EST_read_status</A> <B><A HREF="#DOC.81.7.2">load_file</A></B>(const <!1><A HREF="EST_String.html">EST_String</A> <!1><A HREF="EST_TokenStream.html#DOC.10.7.9">filename</A>, const <!1><A HREF="EST_String.html">EST_String</A> filetype, int <!1><A HREF="EST_Wave.html#DOC.81.5.3">sample_rate</A>, const <!1><A HREF="EST_String.html">EST_String</A> <!1><A HREF="EST_Wave.html#DOC.81.5.8">sample_type</A>, int bo, int nc, int offset = 0, int <!1><A HREF="EST_Wave.html#DOC.81.5.5">length</A> = 0) <DD><I>Load a file of type <tt>filetype</tt> into the waveform.</I> </DL></P> <DT> <IMG ALT="o" SRC=icon2.gif><!1><A HREF="EST_Wave.html">EST_Wave</A>& <B>operator = </B>(const <!1><A HREF="EST_Wave.html">EST_Wave</A>& <!1><A HREF="EST_TrieNode.html#DOC.12.1">w</A>) <DT> <IMG ALT="o" SRC=icon2.gif><!1><A HREF="EST_Wave.html">EST_Wave</A>& <B>operator +=</B>(const <!1><A HREF="EST_Wave.html">EST_Wave</A> &<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>) <DT> <IMG ALT="o" SRC=icon2.gif><!1><A HREF="EST_Wave.html">EST_Wave</A>& <B>operator |=</B>(const <!1><A HREF="EST_Wave.html">EST_Wave</A> &<!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>) <DT> <IMG ALT="o" SRC=icon2.gif>void <B>integrity</B>() const </DL></P> </DL> <HR><H3>Inherited from <A HREF="EST_Featured.html">EST_Featured</A>:</H3> <DL> </DL> <A NAME="DOC.DOCU"></A> <HR> <H2>Documentation</H2> <BLOCKQUOTE>An alias for wave which can be used to tell the compiler you know it is a simple one channel wave. This can speed up access. <P></BLOCKQUOTE> <DL> <A NAME="EST_SingleChannelWave"></A> <A NAME="DOC.82.1"></A> <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_SingleChannelWave()</B></TT> <DD>default constructor <DL><DT><DD></DL><P></DL> <HR><DL><DT><B>This class has no child classes.</B></DL> <DL><DT><DT><B>Author:</B><DD>Richard Caley <rjc@cstr.ed.ac.uk> <DT><B>Version:</B><DD><IMG BORDER=0 SRC=g000006.gif> <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>