Home   Information   Classes   Download   Usage   Mail List   Requirements   Tutorial


WaveLoop Class Reference

STK waveform oscillator class. More...

#include <WaveLoop.h>

Inheritance diagram for WaveLoop::

WvIn Stk List of all members.

Public Methods

 WaveLoop (const char *fileName, bool raw=FALSE)
 Class constructor.

virtual ~WaveLoop ()
 Class destructor.

void setFrequency (MY_FLOAT aFrequency)
 Set the data interpolation rate based on a looping frequency. More...

void addTime (MY_FLOAT aTime)
 Increment the read pointer by aTime samples, modulo file size.

void addPhase (MY_FLOAT anAngle)
 Increment current read pointer by anAngle, relative to a looping frequency. More...

void addPhaseOffset (MY_FLOAT anAngle)
 Add a phase offset to the current read pointer. More...

const MY_FLOAT* tickFrame (void)
 Return a pointer to the next sample frame of data.


Detailed Description

STK waveform oscillator class.

This class inherits from WvIn and provides audio file looping functionality.

WaveLoop supports multi-channel data in interleaved format. It is important to distinguish the tick() methods, which return samples produced by averaging across sample frames, from the tickFrame() methods, which return pointers to multi-channel sample frames. For single-channel data, these methods return equivalent values.

by Perry R. Cook and Gary P. Scavone, 1995 - 2002.


Member Function Documentation

void WaveLoop::setFrequency ( MY_FLOAT aFrequency )
 

Set the data interpolation rate based on a looping frequency.

This function determines the interpolation rate based on the file size and the current Stk::sampleRate. The aFrequency value corresponds to file cycles per second. The frequency can be negative, in which case the loop is read in reverse order.

void WaveLoop::addPhase ( MY_FLOAT anAngle )
 

Increment current read pointer by anAngle, relative to a looping frequency.

This function increments the read pointer based on the file size and the current Stk::sampleRate. The anAngle value is a multiple of file size.

void WaveLoop::addPhaseOffset ( MY_FLOAT anAngle )
 

Add a phase offset to the current read pointer.

This function determines a time offset based on the file size and the current Stk::sampleRate. The anAngle value is a multiple of file size.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2002 Perry R. Cook and Gary P. Scavone. All Rights Reserved.