Home Information Classes Download Usage Mail List Requirements Links Tutorial
#include <WaveLoop.h>
Inheritance diagram for WaveLoop:
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 - 2004.
Definition at line 26 of file WaveLoop.h.
Public Member Functions | |
WaveLoop (std::string fileName, bool raw=false) | |
Class constructor. | |
virtual | ~WaveLoop () |
Class destructor. | |
void | setFrequency (StkFloat frequency) |
Set the data interpolation rate based on a looping frequency. | |
void | addTime (StkFloat time) |
Increment the read pointer by aTime samples, modulo file size. | |
void | addPhase (StkFloat angle) |
Increment current read pointer by anAngle, relative to a looping frequency. | |
void | addPhaseOffset (StkFloat angle) |
Add a phase offset to the current read pointer. | |
const StkFloat * | tickFrame (void) |
Return a pointer to the next sample frame of data. | |
StkFloat * | tickFrame (StkFloat *frameVector, unsigned int frames) |
Read out sample frames of data to frameVector. | |
StkFrames & | tickFrame (StkFrames &frames) |
Fill the StkFrames object with sample frames of data and return the same reference. |
|
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. |
|
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. |
|
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. |
|
Read out sample frames of data to frameVector. An StkError will be thrown if a file is read incrementally and a read error occurs. Reimplemented from WvIn. |
|
Fill the StkFrames object with sample frames of data and return the same reference. An StkError will be thrown if a file is read incrementally and a read error occurs or there is an incompatability between the number of channels in the RtWvIn object and that in the StkFrames object. Reimplemented from WvIn. |
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |