83 |
public: |
public: |
84 |
type_t Type; ///< Voice Type (bit field, a voice may have several types) |
type_t Type; ///< Voice Type (bit field, a voice may have several types) |
85 |
int MIDIKey; ///< MIDI key number of the key that triggered the voice |
int MIDIKey; ///< MIDI key number of the key that triggered the voice |
86 |
|
uint8_t MIDIVelocity; ///< MIDI velocity of the key that triggered the voice |
87 |
|
uint8_t MIDIPan; ///< the current MIDI pan value |
88 |
|
|
89 |
|
SignalUnitRack* const pSignalUnitRack; |
90 |
|
|
91 |
AbstractVoice(); |
AbstractVoice(SignalUnitRack* pRack); |
92 |
virtual ~AbstractVoice(); |
virtual ~AbstractVoice(); |
93 |
|
|
94 |
inline bool IsActive() { return PlaybackState; } |
inline bool IsActive() { return PlaybackState; } |
104 |
int iKeyGroup |
int iKeyGroup |
105 |
); |
); |
106 |
|
|
107 |
|
/** Invoked when the voice is freed - gone from active to inactive. */ |
108 |
|
virtual void VoiceFreed() { } |
109 |
|
|
110 |
virtual void Synthesize(uint Samples, sample_t* pSrc, uint Skip); |
virtual void Synthesize(uint Samples, sample_t* pSrc, uint Skip); |
111 |
|
|
112 |
uint GetSampleRate() { return GetEngine()->SampleRate; } |
uint GetSampleRate() { return GetEngine()->SampleRate; } |
113 |
|
|
114 |
virtual SignalUnitRack* GetSignalUnitRack() { return NULL; } |
uint8_t GetControllerValue(uint8_t Controller) { |
115 |
|
return (Controller > 128) ? 0 : pEngineChannel->ControllerTable[Controller]; |
116 |
|
} |
117 |
|
|
118 |
void processCCEvents(RTList<Event>::Iterator& itEvent, uint End); |
void processCCEvents(RTList<Event>::Iterator& itEvent, uint End); |
119 |
void processPitchEvent(RTList<Event>::Iterator& itEvent); |
void processPitchEvent(RTList<Event>::Iterator& itEvent); |