/[svn]/linuxsampler/trunk/src/engines/sfz/Voice.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sfz/Voice.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2175 by persson, Mon Apr 25 08:12:36 2011 UTC revision 2176 by persson, Sun May 1 15:19:38 2011 UTC
# Line 160  namespace LinuxSampler { namespace sfz { Line 160  namespace LinuxSampler { namespace sfz {
160      }      }
161    
162      double Voice::GetVelocityRelease(uint8_t MIDIKeyVelocity) {      double Voice::GetVelocityRelease(uint8_t MIDIKeyVelocity) {
163          return 0.9; // TODO:          return 127.0 / MIDIKeyVelocity;
164      }      }
165    
166      void Voice::ProcessCCEvent(RTList<Event>::Iterator& itEvent) {      void Voice::ProcessCCEvent(RTList<Event>::Iterator& itEvent) {
# Line 262  namespace LinuxSampler { namespace sfz { Line 262  namespace LinuxSampler { namespace sfz {
262          // otherwise use the v1 EGADSR          // otherwise use the v1 EGADSR
263          pEG1 = &EGADSR1;          pEG1 = &EGADSR1;
264          EGADSR1.trigger(uint(RgnInfo.EG1PreAttack),          EGADSR1.trigger(uint(RgnInfo.EG1PreAttack),
265                          RgnInfo.EG1Attack,                          std::max(0.0, RgnInfo.EG1Attack + pRegion->ampeg_vel2attack * velrelease),
266                          RgnInfo.EG1Hold,                          std::max(0.0, RgnInfo.EG1Hold + pRegion->ampeg_vel2hold * velrelease),
267                          RgnInfo.EG1Decay1,                          std::max(0.0, RgnInfo.EG1Decay1 + pRegion->ampeg_vel2decay * velrelease),
268                          uint(RgnInfo.EG1Sustain),                          uint(std::min(std::max(0.0, RgnInfo.EG1Sustain + 10 * pRegion->ampeg_vel2sustain * velrelease), 1000.0)),
269                          RgnInfo.EG1Release,                          std::max(0.0, RgnInfo.EG1Release + pRegion->ampeg_vel2release * velrelease),
270                          sampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);                          sampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);
271       }      }
272    
273       double Voice::GetEG2ControllerValue(uint8_t MIDIKeyVelocity) {      double Voice::GetEG2ControllerValue(uint8_t MIDIKeyVelocity) {
274          /*double eg2controllervalue = 0;          /*double eg2controllervalue = 0;
275          switch (pRegion->EG2Controller.type) {          switch (pRegion->EG2Controller.type) {
276              case ::gig::eg2_ctrl_t::type_none: // no controller defined              case ::gig::eg2_ctrl_t::type_none: // no controller defined

Legend:
Removed from v.2175  
changed lines
  Added in v.2176

  ViewVC Help
Powered by ViewVC