80 |
*/ |
*/ |
81 |
class Voice { |
class Voice { |
82 |
public: |
public: |
83 |
|
// Types |
84 |
|
enum type_t { |
85 |
|
type_normal, |
86 |
|
type_release_trigger_required, ///< If the key of this voice will be released, it causes a release triggered voice to be spawned |
87 |
|
type_release_trigger ///< Release triggered voice which cannot be killed by releasing its key |
88 |
|
}; |
89 |
|
|
90 |
// Attributes |
// Attributes |
91 |
|
type_t Type; ///< Voice Type |
92 |
int MIDIKey; ///< MIDI key number of the key that triggered the voice |
int MIDIKey; ///< MIDI key number of the key that triggered the voice |
93 |
uint KeyGroup; |
uint KeyGroup; |
94 |
DiskThread* pDiskThread; ///< Pointer to the disk thread, to be able to order a disk stream and later to delete the stream again |
DiskThread* pDiskThread; ///< Pointer to the disk thread, to be able to order a disk stream and later to delete the stream again |
102 |
void Reset(); |
void Reset(); |
103 |
void SetOutput(AudioOutputDevice* pAudioOutputDevice); |
void SetOutput(AudioOutputDevice* pAudioOutputDevice); |
104 |
void SetEngine(Engine* pEngine); |
void SetEngine(Engine* pEngine); |
105 |
int Trigger(Event* pNoteOnEvent, int PitchBend, ::gig::Instrument* pInstrument, int iLayer = 0); |
int Trigger(Event* pNoteOnEvent, int PitchBend, ::gig::Instrument* pInstrument, int iLayer = 0, bool ReleaseTriggerVoice = false); |
106 |
inline bool IsActive() { return Active; } |
inline bool IsActive() { return Active; } |
107 |
private: |
private: |
108 |
// Types |
// Types |