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

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

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

revision 2054 by iliev, Tue Nov 3 19:27:42 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 30  Line 30 
30  namespace LinuxSampler { namespace sf2 {  namespace LinuxSampler { namespace sf2 {
31    
32      Voice::Voice() {      Voice::Voice() {
33          pEngine     = NULL;          pEngine = NULL;
34            pEG1 = &EG1;
35      }      }
36    
37      Voice::~Voice() {      Voice::~Voice() {
# Line 215  namespace LinuxSampler { namespace sf2 { Line 216  namespace LinuxSampler { namespace sf2 {
216          return eg;          return eg;
217      }      }
218    
219        void Voice::TriggerEG1(const EGInfo& egInfo, double velrelease, double velocityAttenuation, uint sampleRate, uint8_t velocity) {
220            EG1.trigger(uint(RgnInfo.EG1PreAttack),
221                        RgnInfo.EG1Attack * egInfo.Attack,
222                        RgnInfo.EG1Hold,
223                        RgnInfo.EG1Decay1 * egInfo.Decay * velrelease,
224                        RgnInfo.EG1Decay2 * egInfo.Decay * velrelease,
225                        RgnInfo.EG1InfiniteSustain,
226                        uint(RgnInfo.EG1Sustain),
227                        RgnInfo.EG1Release * egInfo.Release * velrelease,
228                        velocityAttenuation,
229                        sampleRate / CONFIG_DEFAULT_SUBFRAGMENT_SIZE);
230        }
231    
232      double Voice::GetEG2ControllerValue(uint8_t MIDIKeyVelocity) {      double Voice::GetEG2ControllerValue(uint8_t MIDIKeyVelocity) {
233          /*double eg2controllervalue = 0;          /*double eg2controllervalue = 0;
234          switch (pRegion->EG2Controller.type) {          switch (pRegion->EG2Controller.type) {

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

  ViewVC Help
Powered by ViewVC