Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Function.h
1#ifndef STK_FUNCTION_H
2#define STK_FUNCTION_H
3
4#include "Stk.h"
5
6namespace stk {
7
8/***************************************************/
18/***************************************************/
19
20class Function : public Stk
21{
22 public:
24 Function( void ) { lastFrame_.resize( 1, 1, 0.0 ); };
25
27 StkFloat lastOut( void ) const { return lastFrame_[0]; };
28
30 virtual StkFloat tick( StkFloat input ) = 0;
31
32 protected:
33
34 StkFrames lastFrame_;
35
36};
37
38} // stk namespace
39
40#endif
41
STK abstract function parent class.
Definition Function.h:21
Function(void)
Class constructor.
Definition Function.h:24
virtual StkFloat tick(StkFloat input)=0
Take one sample input and compute one sample of output.
StkFloat lastOut(void) const
Return the last computed output sample.
Definition Function.h:27
An STK class to handle vectorized audio data.
Definition Stk.h:279
virtual void resize(size_t nFrames, unsigned int nChannels=1)
Resize self to represent the specified number of channels and frames.
STK base class.
Definition Stk.h:136
The STK namespace.
Definition ADSR.h:6

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