In file ../include/EST_SingleChannelWave.h:

class EST_SingleChannelWave

An alias for wave which can be used to tell the compiler you know it is a simple one channel wave.

Inheritance:


Public Methods

[more] EST_SingleChannelWave ()
default constructor


Inherited from EST_Wave:

Public Methods

Access functions for finding ampltiudes of samples

[more]short& a(int i, int channel = 0)
return amplitude of sample <tt>i</tt> from channel <tt> channel</tt>.
[more]short operator()(int i, int channel) const
return amplitude of sample <tt>i</tt> from channel <tt> channel</tt>.
[more]short operator()(int i) const
return amplitude of sample <tt>i</tt> from channel 0.
[more]short& a_safe(int i, int channel = 0)
Version of a() that returns zero if index is out of array bounds.
[more]float t(int i) const
return the time position in seconds of the ith sample

Information functions

[more]int num_samples() const
return the number of samples in the waveform
[more]int num_channels() const
return the number of channels in the waveform
[more]int sample_rate() const
return the sampling rate (frequency)
[more]void set_sample_rate(const int n)
Set sampling rate to <tt>n</tt>
[more]int length() const
return the size of the waveform, ie.
[more]float end()
return the time position of the last sample
[more]bool have_left_context(unsigned int n) const
Can we look N samples to the left?
[more]EST_String sample_type() const
returns the file format of the file from which the waveform was read.
[more]EST_String name() const
A string indentifying the waveform, commonly used to store the filename
[more]void set_name(const EST_String n)
Sets name

Waveform manipulation functions

[more]void resize(int num_samples, int num_channels = EST_ALL, int set=1)
resize the waveform
[more]void resample(int rate)
Resample waveform to <tt>rate</tt>
[more]void rescale(float gain, int normalize=0)
multiply all samples by a factor <tt>gain</tt>.
[more]void clear()
clear waveform and set size to 0

File i/o functions

[more]EST_read_status load(const EST_String filename, int offset=0, int length = 0, int rate = default_sample_rate)
Load a file into the waveform.
[more]EST_read_status load_file(const EST_String filename, const EST_String filetype, int sample_rate, const EST_String sample_type, int bo, int nc, int offset = 0, int length = 0)
Load a file of type <tt>filetype</tt> into the waveform.

oEST_Wave& operator = (const EST_Wave& w)
oEST_Wave& operator +=(const EST_Wave &a)
oEST_Wave& operator |=(const EST_Wave &a)
ovoid integrity() const


Inherited from EST_Featured:


Documentation

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.

o EST_SingleChannelWave()
default constructor


This class has no child classes.
Author:
Richard Caley <rjc@cstr.ed.ac.uk>
Version:

Alphabetic index HTML hierarchy of classes or Java


This page is part of the Edinburgh Speech Tools Library documentation
Copyright University of Edinburgh 1997
Contact: speech_tools@cstr.ed.ac.uk