50 |
|
|
51 |
AudioThread(AudioIO* pAudioIO, DiskThread* pDiskThread, gig::Instrument* pInstrument); |
AudioThread(AudioIO* pAudioIO, DiskThread* pDiskThread, gig::Instrument* pInstrument); |
52 |
~AudioThread(); |
~AudioThread(); |
53 |
void ProcessNoteOn(uint8_t Pitch, uint8_t Velocity); |
void SendNoteOn(uint8_t Pitch, uint8_t Velocity); |
54 |
void ProcessNoteOff(uint8_t Pitch, uint8_t Velocity); |
void SendNoteOff(uint8_t Pitch, uint8_t Velocity); |
55 |
void ProcessContinuousController(uint8_t Channel, uint8_t Number, uint8_t Value); |
void SendControlChange(uint8_t Channel, uint8_t Number, uint8_t Value); |
56 |
protected: |
protected: |
57 |
int Main(); ///< Implementation of virtual method from class Thread |
int Main(); ///< Implementation of virtual method from class Thread |
58 |
private: |
private: |
70 |
uint8_t value; |
uint8_t value; |
71 |
} command; |
} command; |
72 |
struct midi_key_info_t { |
struct midi_key_info_t { |
73 |
RTEList<Voice*>* pActiveVoices; ///< Contains the active voices associated with the MIDI key. |
RTEList<Voice*>* pActiveVoices; ///< Contains the active voices associated with the MIDI key. |
74 |
RTEList<Voice*>::NodeHandle hSustainPtr; ///< Points to the voice element in the active voice list which has not received a note-off yet (this pointer is needed for sustain pedal handling) |
RTEList<Voice*>::NodeHandle hSustainPtr; ///< Points to the voice element in the active voice list which has not received a note-off yet (this pointer is needed for sustain pedal handling) |
75 |
bool Sustained; ///< Is true if the MIDI key is currently sustained, thus if Note-off arrived while sustain pedal pressed. |
bool Sustained; ///< Is true if the MIDI key is currently sustained, thus if Note-off arrived while sustain pedal pressed. |
76 |
|
bool KeyPressed; ///< Is true if the respective MIDI key is currently pressed. |
77 |
|
uint* pSustainPoolNode; ///< FIXME: hack to allow fast deallocation of the key from the sustained key pool |
78 |
}; |
}; |
79 |
|
|
80 |
RingBuffer<command_t>* pCommandQueue; |
RingBuffer<command_t>* pCommandQueue; |
94 |
bool SustainPedal; ///< true if sustain pedal is down |
bool SustainPedal; ///< true if sustain pedal is down |
95 |
uint8_t PrevHoldCCValue; |
uint8_t PrevHoldCCValue; |
96 |
|
|
97 |
void ActivateVoice(uint8_t MIDIKey, uint8_t Velocity); |
void ProcessNoteOn(uint8_t MIDIKey, uint8_t Velocity); |
98 |
void ReleaseVoice(uint8_t MIDIKey, uint8_t Velocity); |
void ProcessNoteOff(uint8_t MIDIKey, uint8_t Velocity); |
99 |
|
void ProcessControlChange(uint8_t Channel, uint8_t Number, uint8_t Value); |
100 |
void ReleaseVoice(Voice* pVoice); |
void ReleaseVoice(Voice* pVoice); |
|
void ContinuousController(uint8_t Channel, uint8_t Number, uint8_t Value); |
|
101 |
void CacheInitialSamples(gig::Sample* pSample); |
void CacheInitialSamples(gig::Sample* pSample); |
102 |
}; |
}; |
103 |
|
|