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

  | EST_SingleChannelWave () default constructor

### Inherited from EST_Wave:

### Public Methods

Access functions for finding ampltiudes of samples

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

Information functions

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

Waveform manipulation functions

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

File i/o functions

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.
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.

EST_Wave& operator = (const EST_Wave& w)
EST_Wave& operator +=(const EST_Wave &a)
EST_Wave& operator |=(const EST_Wave &a)
void 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.

`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