35 |
} |
} |
36 |
|
|
37 |
void Voice::Trigger(int MIDIKey, uint8_t Velocity, gig::Instrument* Instrument) { |
void Voice::Trigger(int MIDIKey, uint8_t Velocity, gig::Instrument* Instrument) { |
38 |
Active = true; |
Active = true; |
39 |
this->MIDIKey = MIDIKey; |
this->MIDIKey = MIDIKey; |
40 |
pRegion = Instrument->GetRegion(MIDIKey); |
pRegion = Instrument->GetRegion(MIDIKey); |
41 |
PlaybackState = playback_state_ram; // we always start playback from RAM cache and switch then to disk if needed |
PlaybackState = playback_state_ram; // we always start playback from RAM cache and switch then to disk if needed |
42 |
Pos = 0; |
Pos = 0; |
43 |
|
ReleaseVelocity = 127; // default release velocity value |
44 |
|
|
45 |
if (!pRegion) { |
if (!pRegion) { |
46 |
std::cerr << "Audio Thread: No Region defined for MIDI key " << MIDIKey << std::endl << std::flush; |
std::cerr << "Audio Thread: No Region defined for MIDI key " << MIDIKey << std::endl << std::flush; |