4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
* Copyright (C) 2005 - 2008 Christian Schoenebeck * |
7 |
* Copyright (C) 2009 - 2011 Christian Schoenebeck and Grigor Iliev * |
* Copyright (C) 2009 - 2012 Christian Schoenebeck and Grigor Iliev * |
8 |
* * |
* * |
9 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
10 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
127 |
} |
} |
128 |
}*/ // TODO: ^^^ |
}*/ // TODO: ^^^ |
129 |
} |
} |
130 |
|
|
131 |
|
void Voice::ProcessChannelPressureEvent(RTList<Event>::Iterator& itEvent) { |
132 |
|
//TODO: ... |
133 |
|
} |
134 |
|
|
135 |
|
void Voice::ProcessPolyphonicKeyPressureEvent(RTList<Event>::Iterator& itEvent) { |
136 |
|
//TODO: ... |
137 |
|
} |
138 |
|
|
139 |
void Voice::ProcessCutoffEvent(RTList<Event>::Iterator& itEvent) { |
void Voice::ProcessCutoffEvent(RTList<Event>::Iterator& itEvent) { |
140 |
/*int ccvalue = itEvent->Param.CC.Value; |
/*int ccvalue = itEvent->Param.CC.Value; |
305 |
ctrl = 83; |
ctrl = 83; |
306 |
break; |
break; |
307 |
case ::gig::vcf_cutoff_ctrl_aftertouch: |
case ::gig::vcf_cutoff_ctrl_aftertouch: |
308 |
ctrl = 128; |
ctrl = CTRL_TABLE_IDX_AFTERTOUCH; |
309 |
break; |
break; |
310 |
case ::gig::vcf_cutoff_ctrl_none: |
case ::gig::vcf_cutoff_ctrl_none: |
311 |
default: |
default: |
342 |
} |
} |
343 |
|
|
344 |
void Voice::ProcessGroupEvent(RTList<Event>::Iterator& itEvent) { |
void Voice::ProcessGroupEvent(RTList<Event>::Iterator& itEvent) { |
345 |
if (itEvent->Param.Note.Key != MIDIKey) { |
if (itEvent->Param.Note.Key != HostKey()) { |
346 |
// kill the voice fast |
// kill the voice fast |
347 |
pEG1->enterFadeOutStage(); |
SignalRack.EnterFadeOutStage(); |
348 |
} |
} |
349 |
} |
} |
350 |
|
|
351 |
|
void Voice::CalculateFadeOutCoeff(float FadeOutTime, float SampleRate) { |
352 |
|
SignalRack.CalculateFadeOutCoeff(FadeOutTime, SampleRate); |
353 |
|
} |
354 |
|
|
355 |
|
int Voice::CalculatePan(uint8_t pan) { |
356 |
|
int p = pan + RgnInfo.Pan; |
357 |
|
|
358 |
|
if (p < 0) return 0; |
359 |
|
if (p > 127) return 127; |
360 |
|
return p; |
361 |
|
} |
362 |
|
|
363 |
}} // namespace LinuxSampler::sf2 |
}} // namespace LinuxSampler::sf2 |