#include <iso_synth_grain.h>
Collaboration diagram for iso::synth::Grain:
Public Member Functions | |
Grain (GranularUnit *pUnit) | |
create grain | |
Grain (GranularUnit *pUnit, const Buffer &pAudio, const PointList &pPointList) throw (SynthException) | |
create grain | |
~Grain () | |
destructor | |
void | addGrain (Buffer &pBuffer) throw (SynthException) |
add audio from grain to buffer | |
void | addGrain (Buffer &pBuffer, unsigned int pBufferOffset) throw (SynthException) |
add audio from grain to buffer | |
void | addEnvelope (Channel &pChannel) |
add envelope from grain to channel | |
void | addEnvelope (Channel &pChannel, unsigned int pChannelOffset) |
add envelope from grain to channel | |
bool | finished () const |
return true if grain has reached it's end, false otherwise | |
void | reset () |
reset grain playback | |
void | reset (const Buffer &pAudio, const PointList &pPointList) throw (SynthException) |
reset audio data, amplitude envelope and playback position | |
void | reset (const Buffer &pAudio) throw (SynthException) |
reset audio data and playback position | |
void | reset (const PointList &pPointList) |
reset amplitude envelope and playback position | |
void | setAmplitude (const Frame &pAmplitude) throw (SynthException) |
set amplitude | |
virtual base::String | info () const |
obtain textual grain information | |
Protected Member Functions | |
Grain () | |
default constructor | |
Protected Attributes | |
GranularUnit * | mUnit |
pointer to the unit this grain belongs to | |
Buffer | mAudio |
audio data | |
Channel | mEnvelope |
envelope data | |
Frame | mAmplitude |
amplitude data | |
PointList | mPointList |
envelope point list | |
PointListInterpolStrategy * | mEnvelopeStrategy |
envelope generator | |
unsigned int | mCurrentPlayIndex |
internal index into audio buffer for copying | |
Static Protected Attributes | |
static unsigned int | sFrameCount |
default frame count | |
Friends | |
std::ostream & | operator<< (std::ostream &pOstream, const Grain &pGrain) |
print unit information |
for granular synthesis
Created by Daniel Bisig on 6/14/07.
Grain::Grain | ( | GranularUnit * | pUnit | ) |
create grain
pUnit | granular unit this grain belongs to |
Grain::Grain | ( | GranularUnit * | pUnit, | |
const Buffer & | pAudio, | |||
const PointList & | pPointList | |||
) | throw (SynthException) |
create grain
pUnit | granular unit this grain belongs to | |
pAudio | audio data | |
pPointList | amplitude envelope |
SynthException | channelcount mismatch between associated unit and audio buffer |
Grain::~Grain | ( | ) |
destructor
Grain::Grain | ( | ) | [protected] |
default constructor
void Grain::addGrain | ( | Buffer & | pBuffer | ) | throw (SynthException) |
add audio from grain to buffer
pBuffer | buffer |
SynthException | channelcount mismatch between associated unit and audio buffer |
void Grain::addGrain | ( | Buffer & | pBuffer, | |
unsigned int | pBufferOffset | |||
) | throw (SynthException) |
add audio from grain to buffer
pBuffer | buffer | |
pBufferOffset | offset into buffer |
SynthException | channelcount mismatch between associated unit and audio buffer |
void Grain::addEnvelope | ( | Channel & | pChannel | ) |
add envelope from grain to channel
pChannel | channel |
void Grain::addEnvelope | ( | Channel & | pChannel, | |
unsigned int | pChannelOffset | |||
) |
add envelope from grain to channel
pChannel | channel | |
pChannelOffset | offset into channel |
bool Grain::finished | ( | ) | const |
return true if grain has reached it's end, false otherwise
void Grain::reset | ( | ) |
reset grain playback
playback of grain will start again at it's beginning
void Grain::reset | ( | const Buffer & | pAudio, | |
const PointList & | pPointList | |||
) | throw (SynthException) |
reset audio data, amplitude envelope and playback position
pAudio | audio data | |
pPointList | amplitude envelope |
SynthException | channelcount mismatch between associated unit and audio buffer |
void Grain::reset | ( | const Buffer & | pAudio | ) | throw (SynthException) |
reset audio data and playback position
pAudio | audio data |
SynthException | channelcount mismatch between associated unit and audio buffer |
void Grain::reset | ( | const PointList & | pPointList | ) |
reset amplitude envelope and playback position
pPointList | amplitude envelope |
void Grain::setAmplitude | ( | const Frame & | pAmplitude | ) | throw (SynthException) |
set amplitude
pAmplitude | amplitude |
SynthException | channelcount mismatch between associated unit and amplitude frame |
base::String Grain::info | ( | ) | const [virtual] |
obtain textual grain information
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const Grain & | pGrain | |||
) | [friend] |
print unit information
unsigned int Grain::sFrameCount [static, protected] |
default frame count
GranularUnit* iso::synth::Grain::mUnit [protected] |
pointer to the unit this grain belongs to
Buffer iso::synth::Grain::mAudio [protected] |
audio data
Channel iso::synth::Grain::mEnvelope [protected] |
envelope data
Frame iso::synth::Grain::mAmplitude [protected] |
amplitude data
PointList iso::synth::Grain::mPointList [protected] |
envelope point list
envelope generator
unsigned int iso::synth::Grain::mCurrentPlayIndex [protected] |
internal index into audio buffer for copying