/[svn]/linuxsampler/trunk/src/engines/common/AbstractVoice.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/AbstractVoice.h

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 31  Line 31 
31  #include "../AbstractEngineChannel.h"  #include "../AbstractEngineChannel.h"
32  #include "../common/LFOBase.h"  #include "../common/LFOBase.h"
33  #include "../EngineBase.h"  #include "../EngineBase.h"
34    #include "EG.h"
35  #include "../gig/EGADSR.h"  #include "../gig/EGADSR.h"
36  #include "../gig/EGDecay.h"  #include "../gig/EGDecay.h"
37  #include "../gig/SmoothVolume.h"  #include "../gig/SmoothVolume.h"
# Line 133  namespace LinuxSampler { Line 134  namespace LinuxSampler {
134              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
135              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.
136              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
137              gig::EGADSR                 EG1;                ///< Envelope Generator 1 (Amplification)              EG*                         pEG1;               ///< Envelope Generator 1 (Amplification)
138              gig::EGADSR                 EG2;                ///< Envelope Generator 2 (Filter cutoff frequency)              gig::EGADSR                 EG2;                ///< Envelope Generator 2 (Filter cutoff frequency) TODO: use common EG instead of gig
139              gig::EGDecay                EG3;                ///< Envelope Generator 3 (Pitch)              gig::EGDecay                EG3;                ///< Envelope Generator 3 (Pitch) TODO: use common EG instead?
140              midi_ctrl                   VCFCutoffCtrl;              midi_ctrl                   VCFCutoffCtrl;
141              midi_ctrl                   VCFResonanceCtrl;              midi_ctrl                   VCFResonanceCtrl;
142              LFOUnsigned*                pLFO1;               ///< Low Frequency Oscillator 1 (Amplification)              LFOUnsigned*                pLFO1;               ///< Low Frequency Oscillator 1 (Amplification)
# Line 189  namespace LinuxSampler { Line 190  namespace LinuxSampler {
190    
191              virtual PitchInfo CalculatePitchInfo(int PitchBend);              virtual PitchInfo CalculatePitchInfo(int PitchBend);
192    
193                // TODO: cleanup the interface. The following two methods
194                // are maybe not neccessary after the TriggerEG1 method
195                // was added.
196    
197              /**              /**
198               * Get current value of EG1 controller.               * Get current value of EG1 controller.
199               */               */
# Line 199  namespace LinuxSampler { Line 204  namespace LinuxSampler {
204               */               */
205              virtual EGInfo CalculateEG1ControllerInfluence(double eg1ControllerValue) = 0;              virtual EGInfo CalculateEG1ControllerInfluence(double eg1ControllerValue) = 0;
206    
207                // TODO: cleanup the interface. The velrelase and
208                // velocityAttenuation parameters are perhaps too gig
209                // specific.
210                /**
211                 * Trigger the amplitude envelope generator.
212                 */
213                virtual void TriggerEG1(const EGInfo& egInfo, double velrelease, double velocityAttenuation, uint sampleRate, uint8_t velocity) = 0;
214    
215              /**              /**
216               * Get current value of EG2 controller.               * Get current value of EG2 controller.
217               */               */

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

  ViewVC Help
Powered by ViewVC