The Synthesis ToolKit in C++ (STK)

Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

Generator.h
1 #ifndef STK_GENERATOR_H
2 #define STK_GENERATOR_H
3
4 #include "Stk.h"
5
6 namespace stk {
7
8 /***************************************************/
18 /***************************************************/
19
20 class Generator : public Stk
21 {
22 public:
23
25 Generator( void ) { lastFrame_.resize( 1, 1, 0.0 ); };
26
28 unsigned int channelsOut( void ) const { return lastFrame_.channels(); };
29
31 const StkFrames& lastFrame( void ) const { return lastFrame_; };
32
34
41 virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 0 ) = 0;
42
43 protected:
44
45 StkFrames lastFrame_;
46 };
47
48 } // stk namespace
49
50 #endif
stk::Generator
STK abstract unit generator parent class.
Definition: Generator.h:20
stk::StkFrames::resize
void resize(size_t nFrames, unsigned int nChannels=1)
Resize self to represent the specified number of channels and frames.
stk::StkFrames
An STK class to handle vectorized audio data.
Definition: Stk.h:275
stk::Generator::tick
virtual StkFrames & tick(StkFrames &frames, unsigned int channel=0)=0
Fill the StkFrames object with computed sample frames, starting at the specified channel.
stk::StkFrames::channels
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:404
stk::Generator::Generator
Generator(void)
Class constructor.
Definition: Generator.h:25
stk::Generator::channelsOut
unsigned int channelsOut(void) const
Return the number of output channels for the class.
Definition: Generator.h:28
stk
The STK namespace.
Definition: ADSR.h:6
stk::Generator::lastFrame
const StkFrames & lastFrame(void) const
Return an StkFrames reference to the last output sample frame.
Definition: Generator.h:31
stk::Stk
STK base class.
Definition: Stk.h:132

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