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

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

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

revision 738 by schoenebeck, Tue Aug 16 17:14:25 2005 UTC revision 829 by schoenebeck, Sat Jan 14 14:07:47 2006 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 Christian Schoenebeck                              *   *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   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 41  Line 41 
41  #include "EGDecay.h"  #include "EGDecay.h"
42  #include "Filter.h"  #include "Filter.h"
43  #include "../common/LFOBase.h"  #include "../common/LFOBase.h"
44    #include "SynthesisParam.h"
45    
46  // include the appropriate (unsigned) triangle LFO implementation  // include the appropriate (unsigned) triangle LFO implementation
47  #if CONFIG_UNSIGNED_TRIANG_ALGO == INT_MATH_SOLUTION  #if CONFIG_UNSIGNED_TRIANG_ALGO == INT_MATH_SOLUTION
# Line 121  namespace LinuxSampler { namespace gig { Line 122  namespace LinuxSampler { namespace gig {
122              int  Trigger(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent, int PitchBend, ::gig::DimensionRegion* pDimRgn, type_t VoiceType, int iKeyGroup);              int  Trigger(EngineChannel* pEngineChannel, Pool<Event>::Iterator& itNoteOnEvent, int PitchBend, ::gig::DimensionRegion* pDimRgn, type_t VoiceType, int iKeyGroup);
123              inline bool IsActive() { return PlaybackState; }              inline bool IsActive() { return PlaybackState; }
124              inline bool IsStealable() { return !itKillEvent && PlaybackState >= playback_state_ram; }              inline bool IsStealable() { return !itKillEvent && PlaybackState >= playback_state_ram; }
125                void UpdatePortamentoPos(Pool<Event>::Iterator& itNoteOffEvent);
126    
127          //private:          //private:
128              // Types              // Types
129              enum playback_state_t {              enum playback_state_t {
# Line 149  namespace LinuxSampler { namespace gig { Line 152  namespace LinuxSampler { namespace gig {
152              int                         RealSampleWordsLeftToRead; ///< Number of samples left to read, not including the silence added for the interpolator              int                         RealSampleWordsLeftToRead; ///< Number of samples left to read, not including the silence added for the interpolator
153              unsigned long               MaxRAMPos;          ///< The upper allowed limit (not actually the end) in the RAM sample cache, after that point it's not safe to chase the interpolator another time over over the current cache position, instead we switch to disk then.              unsigned long               MaxRAMPos;          ///< The upper allowed limit (not actually the end) in the RAM sample cache, after that point it's not safe to chase the interpolator another time over over the current cache position, instead we switch to disk then.
154              bool                        RAMLoop;            ///< If this voice has a loop defined which completely fits into the cached RAM part of the sample, in this case we handle the looping within the voice class, else if the loop is located in the disk stream part, we let the disk stream handle the looping              bool                        RAMLoop;            ///< If this voice has a loop defined which completely fits into the cached RAM part of the sample, in this case we handle the looping within the voice class, else if the loop is located in the disk stream part, we let the disk stream handle the looping
155              uint                        LoopCyclesLeft;     ///< In case there is a RAMLoop and it's not an endless loop; reflects number of loop cycles left to be passed              //uint                        LoopCyclesLeft;     ///< In case there is a RAMLoop and it's not an endless loop; reflects number of loop cycles left to be passed
156              uint                        Delay;              ///< Number of sample points the rendering process of this voice should be delayed (jitter correction), will be set to 0 after the first audio fragment cycle              uint                        Delay;              ///< Number of sample points the rendering process of this voice should be delayed (jitter correction), will be set to 0 after the first audio fragment cycle
157              EGADSR                      EG1;                ///< Envelope Generator 1 (Amplification)              EGADSR                      EG1;                ///< Envelope Generator 1 (Amplification)
158              EGADSR                      EG2;                ///< Envelope Generator 2 (Filter cutoff frequency)              EGADSR                      EG2;                ///< Envelope Generator 2 (Filter cutoff frequency)
159              EGDecay                     EG3;                ///< Envelope Generator 3 (Pitch)              EGDecay                     EG3;                ///< Envelope Generator 3 (Pitch)
             Filter                      FilterLeft;  
             Filter                      FilterRight;  
160              midi_ctrl                   VCFCutoffCtrl;              midi_ctrl                   VCFCutoffCtrl;
161              midi_ctrl                   VCFResonanceCtrl;              midi_ctrl                   VCFResonanceCtrl;
162              static const float          FILTER_CUTOFF_COEFF;              static const float          FILTER_CUTOFF_COEFF;
# Line 170  namespace LinuxSampler { namespace gig { Line 171  namespace LinuxSampler { namespace gig {
171              Pool<Event>::Iterator       itKillEvent;         ///< Event which caused this voice to be killed              Pool<Event>::Iterator       itKillEvent;         ///< Event which caused this voice to be killed
172          //private:          //private:
173              int                         SynthesisMode;              int                         SynthesisMode;
   
   
             float                       fFinalPitch;  
174              float                       fFinalVolume;              float                       fFinalVolume;
175              float                       fFinalCutoff;              float                       fFinalCutoff;
176              float                       fFinalResonance;              float                       fFinalResonance;
177                SynthesisParam              finalSynthesisParameters;
178                Loop                        loop;
179    
180              // Static Methods              // Static Methods
181              static float CalculateFilterCutoffCoeff();              static float CalculateFilterCutoffCoeff();

Legend:
Removed from v.738  
changed lines
  Added in v.829

  ViewVC Help
Powered by ViewVC