The Synthesis ToolKit in C++ (STK)

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
20 class 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::Function
STK abstract function parent class.
Definition Function.h:21
stk::Function::Function
Function(void)
Class constructor.
Definition Function.h:24
stk::Function::tick
virtual StkFloat tick(StkFloat input)=0
Take one sample input and compute one sample of output.
stk::Function::lastOut
StkFloat lastOut(void) const
Return the last computed output sample.
Definition Function.h:27
stk::StkFrames
An STK class to handle vectorized audio data.
Definition Stk.h:279
stk::StkFrames::resize
virtual void resize(size_t nFrames, unsigned int nChannels=1)
Resize self to represent the specified number of channels and frames.
stk::Stk
STK base class.
Definition Stk.h:136
stk
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.