600 |
float noteLength = float(GetEngine()->FrameTime + Delay - |
float noteLength = float(GetEngine()->FrameTime + Delay - |
601 |
GetNoteOnTime(MIDIKey) ) / GetEngine()->SampleRate; |
GetNoteOnTime(MIDIKey) ) / GetEngine()->SampleRate; |
602 |
|
|
603 |
float attenuation = 1 - 0.01053 * (256 >> RgnInfo.ReleaseTriggerDecay) * noteLength; |
volume *= GetReleaseTriggerAttenuation(noteLength); |
|
volume *= attenuation; |
|
604 |
} |
} |
605 |
|
|
606 |
return volume; |
return volume; |
607 |
} |
} |
608 |
|
|
609 |
|
float AbstractVoice::GetReleaseTriggerAttenuation(float noteLength) { |
610 |
|
return 1 - RgnInfo.ReleaseTriggerDecay * noteLength; |
611 |
|
} |
612 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |