Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

# stk::Generator Class Reference

STK abstract unit generator parent class. More...

`#include <Generator.h>`

Inheritance diagram for stk::Generator:

List of all members.

## Public Member Functions
| Generator (void)
| Class constructor.
unsigned int | channelsOut (void) const
| Return the number of output channels for the class.
const StkFrames & | lastFrame (void) const
| Return an StkFrames reference to the last output sample frame.
virtual StkFrames & | tick (StkFrames &frames, unsigned int channel=0)=0
| Fill the StkFrames object with computed sample frames, starting at the specified channel.

## Detailed Description

STK abstract unit generator parent class.

This class provides limited common functionality for STK unit generator sample-source subclasses. It is general enough to support both monophonic and polyphonic output classes.

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

## Member Function Documentation

virtual StkFrames& stk::Generator::tick | ( | StkFrames & | frames,
|  | unsigned int | channel = `0` |
| ) |  |  | `[pure virtual]`

Fill the StkFrames object with computed sample frames, starting at the specified channel.

The `channel` argument plus the number of output channels must be less than the number of channels in the StkFrames argument (the first channel is specified by 0). However, range checking is only performed if _STK_DEBUG_ is defined during compilation, in which case an out-of-range value will trigger an StkError exception.

Implemented in stk::ADSR, stk::Asymp, stk::Blit, stk::BlitSaw, stk::BlitSquare, stk::Envelope, stk::Granulate, stk::Modulate, stk::Noise, stk::SineWave, and stk::SingWave.

The documentation for this class was generated from the following file:

- Generator.h

The Synthesis ToolKit in C++ (STK)
©1995-2010 Perry R. Cook and Gary P. Scavone. All Rights Reserved.