/[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 2217 by iliev, Tue Jul 26 15:51:30 2011 UTC revision 3017 by schoenebeck, Wed Oct 19 12:28:40 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 - 2011 Christian Schoenebeck and Grigor Iliev      *   *   Copyright (C) 2009 - 2012 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 127  namespace LinuxSampler { namespace sf2 { Line 127  namespace LinuxSampler { namespace sf2 {
127              }              }
128          }*/ // TODO: ^^^          }*/ // TODO: ^^^
129      }      }
130        
131        void Voice::ProcessChannelPressureEvent(RTList<Event>::Iterator& itEvent) {
132            //TODO: ...
133        }
134        
135        void Voice::ProcessPolyphonicKeyPressureEvent(RTList<Event>::Iterator& itEvent) {
136            //TODO: ...
137        }
138    
139      void Voice::ProcessCutoffEvent(RTList<Event>::Iterator& itEvent) {      void Voice::ProcessCutoffEvent(RTList<Event>::Iterator& itEvent) {
140          /*int ccvalue = itEvent->Param.CC.Value;          /*int ccvalue = itEvent->Param.CC.Value;
# Line 297  namespace LinuxSampler { namespace sf2 { Line 305  namespace LinuxSampler { namespace sf2 {
305                  ctrl = 83;                  ctrl = 83;
306                  break;                  break;
307              case ::gig::vcf_cutoff_ctrl_aftertouch:              case ::gig::vcf_cutoff_ctrl_aftertouch:
308                  ctrl = 128;                  ctrl = CTRL_TABLE_IDX_AFTERTOUCH;
309                  break;                  break;
310              case ::gig::vcf_cutoff_ctrl_none:              case ::gig::vcf_cutoff_ctrl_none:
311              default:              default:
# Line 334  namespace LinuxSampler { namespace sf2 { Line 342  namespace LinuxSampler { namespace sf2 {
342      }      }
343    
344      void Voice::ProcessGroupEvent(RTList<Event>::Iterator& itEvent) {      void Voice::ProcessGroupEvent(RTList<Event>::Iterator& itEvent) {
345          if (itEvent->Param.Note.Key != MIDIKey) {          if (itEvent->Param.Note.Key != HostKey()) {
346              // kill the voice fast              // kill the voice fast
347              pEG1->enterFadeOutStage();              SignalRack.EnterFadeOutStage();
348          }          }
349      }      }
350    
351        void Voice::CalculateFadeOutCoeff(float FadeOutTime, float SampleRate) {
352            SignalRack.CalculateFadeOutCoeff(FadeOutTime, SampleRate);
353        }
354    
355        int Voice::CalculatePan(uint8_t pan) {
356            int p = pan + RgnInfo.Pan;
357    
358            if (p < 0) return 0;
359            if (p > 127) return 127;
360            return p;
361        }
362    
363  }} // namespace LinuxSampler::sf2  }} // namespace LinuxSampler::sf2

Legend:
Removed from v.2217  
changed lines
  Added in v.3017

  ViewVC Help
Powered by ViewVC