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

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

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

revision 2837 by persson, Sun Aug 23 06:14:00 2015 UTC revision 3054 by schoenebeck, Thu Dec 15 12:47:45 2016 UTC
# Line 4  Line 4 
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 - 2015 Christian Schoenebeck and Grigor Iliev      *   *   Copyright (C) 2009 Christian Schoenebeck and Grigor Iliev             *
8     *   Copyright (C) 2010 - 2016 Christian Schoenebeck and Andreas Persson   *
9   *                                                                         *   *                                                                         *
10   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
11   *   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  *
# Line 58  namespace LinuxSampler { namespace gig { Line 59  namespace LinuxSampler { namespace gig {
59          si.ChannelCount     = pSample->Channels;          si.ChannelCount     = pSample->Channels;
60          si.FrameSize        = pSample->FrameSize;          si.FrameSize        = pSample->FrameSize;
61          si.BitDepth         = pSample->BitDepth;          si.BitDepth         = pSample->BitDepth;
62          si.TotalFrameCount  = pSample->SamplesTotal;          si.TotalFrameCount  = (uint)pSample->SamplesTotal;
63    
64          si.HasLoops       = pRegion->SampleLoops;          si.HasLoops       = pRegion->SampleLoops;
65          si.LoopStart      = (si.HasLoops) ? pRegion->pSampleLoops[0].LoopStart  : 0;          si.LoopStart      = (si.HasLoops) ? pRegion->pSampleLoops[0].LoopStart  : 0;
# Line 341  namespace LinuxSampler { namespace gig { Line 342  namespace LinuxSampler { namespace gig {
342                  break;                  break;
343              case ::gig::lfo3_ctrl_aftertouch:              case ::gig::lfo3_ctrl_aftertouch:
344                  lfo3_internal_depth  = 0;                  lfo3_internal_depth  = 0;
345                  pLFO3->ExtController = 128;                  pLFO3->ExtController = CTRL_TABLE_IDX_AFTERTOUCH;
346                  bLFO3Enabled         = true;                  bLFO3Enabled         = true;
347                  break;                  break;
348              case ::gig::lfo3_ctrl_internal_modwheel:              case ::gig::lfo3_ctrl_internal_modwheel:
# Line 351  namespace LinuxSampler { namespace gig { Line 352  namespace LinuxSampler { namespace gig {
352                  break;                  break;
353              case ::gig::lfo3_ctrl_internal_aftertouch:              case ::gig::lfo3_ctrl_internal_aftertouch:
354                  lfo3_internal_depth  = pRegion->LFO3InternalDepth;                  lfo3_internal_depth  = pRegion->LFO3InternalDepth;
355                  pLFO3->ExtController = 128;                  pLFO3->ExtController = CTRL_TABLE_IDX_AFTERTOUCH;
356                  bLFO3Enabled         = (lfo3_internal_depth > 0 || pRegion->LFO3ControlDepth > 0);                  bLFO3Enabled         = (lfo3_internal_depth > 0 || pRegion->LFO3ControlDepth > 0);
357                  break;                  break;
358              default:              default:
# Line 373  namespace LinuxSampler { namespace gig { Line 374  namespace LinuxSampler { namespace gig {
374      float Voice::CalculateCutoffBase(uint8_t MIDIKeyVelocity) {      float Voice::CalculateCutoffBase(uint8_t MIDIKeyVelocity) {
375          float cutoff = pRegion->GetVelocityCutoff(MIDIKeyVelocity);          float cutoff = pRegion->GetVelocityCutoff(MIDIKeyVelocity);
376          if (pRegion->VCFKeyboardTracking) {          if (pRegion->VCFKeyboardTracking) {
377              cutoff *= RTMath::CentsToFreqRatioUnlimited((MIDIKey - pRegion->VCFKeyboardTrackingBreakpoint) * 100);              cutoff *= RTMath::CentsToFreqRatioUnlimited((MIDIKey() - pRegion->VCFKeyboardTrackingBreakpoint) * 100);
378          }          }
379          return cutoff;          return cutoff;
380      }      }
# Line 426  namespace LinuxSampler { namespace gig { Line 427  namespace LinuxSampler { namespace gig {
427                  ctrl = 83;                  ctrl = 83;
428                  break;                  break;
429              case ::gig::vcf_cutoff_ctrl_aftertouch:              case ::gig::vcf_cutoff_ctrl_aftertouch:
430                  ctrl = 128;                  ctrl = CTRL_TABLE_IDX_AFTERTOUCH;
431                  break;                  break;
432              case ::gig::vcf_cutoff_ctrl_none:              case ::gig::vcf_cutoff_ctrl_none:
433              default:              default:
# Line 498  namespace LinuxSampler { namespace gig { Line 499  namespace LinuxSampler { namespace gig {
499          // note should be stopped at all, because it doesn't sound naturally          // note should be stopped at all, because it doesn't sound naturally
500          // with a drumkit.          // with a drumkit.
501          // -- Christian, 2013-01-08          // -- Christian, 2013-01-08
502          if (itEvent->Param.Note.Key != MIDIKey /*||          if (itEvent->Param.Note.Key != HostKey() /*||
503              !GetGigEngineChannel()->SustainPedal*/) {              !GetGigEngineChannel()->SustainPedal*/) {
504              dmsg(4,("Voice %p - kill", (void*)this));              dmsg(4,("Voice %p - kill", (void*)this));
505    

Legend:
Removed from v.2837  
changed lines
  Added in v.3054

  ViewVC Help
Powered by ViewVC