21 #if (defined (_MSCVER) || defined (_MSC_VER)) 22 #pragma warning ( disable: 4201) 34 static const int EG_SIZE = 256;
41 static float egPow[EG_SIZE];
42 static float egLin[EG_SIZE];
45 bool constant =
false;
56 val = table[EG_SIZE * count/
steps]*(max-
offset)+offset;
62 void setTime(
float ms,
int sampleRate);
86 void set(
int b) { data = b * 256; }
87 void set(
double b) { data = b * 256.0; }
88 void setIndex(
int b) { data = b * 256 + _fract; }
89 int index()
const {
return data >> 8; }
90 unsigned fract()
const {
return _fract; }
156 void start(
Channel* channel,
int key,
int velo,
const Zone*,
double durSinceNoteOn);
157 void updateEnvelopes();
158 void process(
int frames,
float*);
160 short getData(
long long pos);
163 int key()
const {
return _key; }
171 void stop(
float time);
174 const char* state()
const;
180 int offBy()
const {
return _offBy; }
bool step()
Definition: voice.h:52
float val
Definition: voice.h:48
int key() const
Definition: voice.h:163
long long _loopEnd
Definition: voice.h:134
int velocity() const
Definition: voice.h:164
int currentEnvelope
Definition: voice.h:144
V1Envelopes
Definition: voice.h:104
int _offBy
Definition: voice.h:132
OffMode offMode() const
Definition: voice.h:179
float max
Definition: voice.h:47
int _velocity
Definition: voice.h:125
int _key
Definition: voice.h:124
bool isPlaying() const
Definition: voice.h:166
void setConstant(float v)
Definition: voice.h:63
Definition: zerberus.h:75
void stop()
Definition: voice.h:170
LoopMode _loopMode
Definition: voice.h:130
int64_t data
Definition: voice.h:79
long long eidx
Definition: voice.h:129
uint8_t _fract
Definition: voice.h:81
Voice * _next
Definition: voice.h:119
void setNext(Voice *v)
Definition: voice.h:154
int offBy() const
Definition: voice.h:180
Zerberus * _zerberus
Definition: voice.h:120
void setTime(float ms, int sampleRate)
Definition: voice.cpp:34
Phase()
Definition: voice.h:92
void setIndex(int b)
Definition: voice.h:88
ZFilter filter
Definition: voice.h:142
Phase phaseIncr
Definition: voice.h:140
bool _looping
Definition: voice.h:135
Channel * _channel
Definition: voice.h:123
Trigger
Definition: zone.h:23
float gain
Definition: voice.h:138
Phase(int64_t v)
Definition: voice.h:93
void operator+=(const Phase &p)
Definition: voice.h:85
int index() const
Definition: voice.h:89
VoiceState
Definition: voice.h:96
bool isOff() const
Definition: voice.h:168
Channel * channel() const
Definition: voice.h:162
float getGain()
Definition: voice.h:177
void off()
Definition: voice.h:173
Trigger trigger
Definition: voice.h:147
LoopMode loopMode() const
Definition: voice.h:175
int steps
Definition: voice.h:44
OffMode
Definition: zone.h:39
int getSamplesSinceStart()
Definition: voice.h:176
LoopMode
Definition: zone.h:31
const Zone * z
Definition: voice.h:149
OffMode _offMode
Definition: voice.h:131
void setVariable()
Definition: voice.h:64
bool isSustained() const
Definition: voice.h:167
Voice * next() const
Definition: voice.h:153
float * table
Definition: voice.h:49
unsigned fract() const
Definition: voice.h:90
bool isStopped() const
Definition: voice.h:169
long long _loopStart
Definition: voice.h:133
short * data
Definition: voice.h:128
int count
Definition: voice.h:44
int _samplesSinceStart
Definition: voice.h:136
float offset
Definition: voice.h:46
void sustained()
Definition: voice.h:172
int audioChan
Definition: voice.h:126
void setTable(float *f)
Definition: voice.h:51