Home
Information
Classes
Download
Usage
Mail List
Requirements
Links
FAQ
Tutorial
include
Sampler.h
1
#ifndef STK_SAMPLER_H
2
#define STK_SAMPLER_H
3
4
#include "Instrmnt.h"
5
#include "ADSR.h"
6
#include "FileLoop.h"
7
#include "OnePole.h"
8
9
namespace
stk {
10
11
/***************************************************/
20
/***************************************************/
21
22
class
Sampler
:
public
Instrmnt
23
{
24
public
:
26
Sampler
(
void
);
27
29
virtual
~Sampler
(
void
);
30
32
virtual
void
setFrequency
( StkFloat frequency ) = 0;
33
35
void
keyOn
(
void
);
36
38
void
keyOff
(
void
);
39
41
virtual
void
noteOff
( StkFloat amplitude );
42
44
virtual
void
controlChange
(
int
number, StkFloat value ) = 0;
45
47
virtual
StkFloat
tick
(
unsigned
int
channel = 0 ) = 0;
48
50
57
virtual
StkFrames
&
tick
(
StkFrames
& frames,
unsigned
int
channel = 0 ) = 0;
58
59
protected
:
60
61
ADSR
adsr_;
62
std::vector<FileWvIn *> attacks_;
63
std::vector<FileLoop *> loops_;
64
OnePole
filter_;
65
StkFloat baseFrequency_;
66
std::vector<StkFloat> attackRatios_;
67
std::vector<StkFloat> loopRatios_;
68
StkFloat attackGain_;
69
StkFloat loopGain_;
70
71
};
72
73
}
// stk namespace
74
75
#endif
The Synthesis ToolKit in C++ (STK)
©1995--2019 Perry R. Cook and Gary P. Scavone. All Rights Reserved.