/[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 2015 by iliev, Sun Oct 25 22:22:52 2009 UTC revision 2055 by persson, Sat Jan 30 10:30:02 2010 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
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 - 2009 Christian Schoenebeck                       *   *   Copyright (C) 2005 - 2008 Christian Schoenebeck                       *
7   *   Copyright (C) 2009 Grigor Iliev                                       *   *   Copyright (C) 2009 - 2010 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  *
# Line 33  Line 33 
33  namespace LinuxSampler { namespace gig {  namespace LinuxSampler { namespace gig {
34    
35      Voice::Voice() {      Voice::Voice() {
36          pEngine     = NULL;          pEngine = NULL;
37            pEG1 = &EG1;
38      }      }
39    
40      Voice::~Voice() {      Voice::~Voice() {
           
41      }      }
42    
43      EngineChannel* Voice::GetGigEngineChannel() {      EngineChannel* Voice::GetGigEngineChannel() {
# Line 359  namespace LinuxSampler { namespace gig { Line 359  namespace LinuxSampler { namespace gig {
359              pLFO3->update(pLFO3->ExtController ? GetGigEngineChannel()->ControllerTable[pLFO3->ExtController] : 0);              pLFO3->update(pLFO3->ExtController ? GetGigEngineChannel()->ControllerTable[pLFO3->ExtController] : 0);
360          }          }
361      }      }
362        
363      float Voice::CalculateCutoffBase(uint8_t MIDIKeyVelocity) {      float Voice::CalculateCutoffBase(uint8_t MIDIKeyVelocity) {
364          float cutoff = pRegion->GetVelocityCutoff(MIDIKeyVelocity);          float cutoff = pRegion->GetVelocityCutoff(MIDIKeyVelocity);
365          if (pRegion->VCFKeyboardTracking) {          if (pRegion->VCFKeyboardTracking) {
# Line 450  namespace LinuxSampler { namespace gig { Line 450  namespace LinuxSampler { namespace gig {
450          return ctrl;          return ctrl;
451      }      }
452    
453        void Voice::TriggerEG1(const EGInfo& egInfo, double velrelease, double velocityAttenuation, uint sampleRate, uint8_t velocity) {
454            EG1.trigger(uint(RgnInfo.EG1PreAttack),
455                        RgnInfo.EG1Attack * egInfo.Attack,
456                        RgnInfo.EG1Hold,
457                        RgnInfo.EG1Decay1 * egInfo.Decay * velrelease,
458                        RgnInfo.EG1Decay2 * egInfo.Decay * velrelease,
459                        RgnInfo.EG1InfiniteSustain,
460                        uint(RgnInfo.EG1Sustain),
461                        RgnInfo.EG1Release * egInfo.Release * velrelease,
462                        velocityAttenuation,
463                        sampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);
464        }
465  }} // namespace LinuxSampler::gig  }} // namespace LinuxSampler::gig

Legend:
Removed from v.2015  
changed lines
  Added in v.2055

  ViewVC Help
Powered by ViewVC