--- linuxsampler/trunk/src/engines/sf2/Voice.h 2010/01/30 10:30:02 2055 +++ linuxsampler/trunk/src/engines/sf2/Voice.h 2011/07/09 16:44:27 2203 @@ -4,7 +4,7 @@ * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * * Copyright (C) 2005 - 2008 Christian Schoenebeck * - * Copyright (C) 2009 - 2010 Christian Schoenebeck and Grigor Iliev * + * Copyright (C) 2009 - 2011 Christian Schoenebeck and Grigor Iliev * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -36,6 +36,7 @@ #include "../gig/Filter.h" #include "../common/VoiceBase.h" #include "../gig/SynthesisParam.h" +#include "../sfz/EGADSR.h" namespace LinuxSampler { namespace sf2 { class Engine; @@ -63,6 +64,7 @@ virtual void TriggerEG1(const EGInfo& egInfo, double velrelease, double velocityAttenuation, uint sampleRate, uint8_t velocity); virtual double GetEG2ControllerValue(uint8_t MIDIKeyVelocity); virtual EGInfo CalculateEG2ControllerInfluence(double eg2ControllerValue); + virtual void TriggerEG2(const EGInfo& egInfo, double velrelease, double velocityAttenuation, uint sampleRate, uint8_t velocity); virtual void InitLFO1(); virtual void InitLFO2(); virtual void InitLFO3(); @@ -75,9 +77,12 @@ virtual double GetVelocityAttenuation(uint8_t MIDIKeyVelocity); virtual double GetVelocityRelease(uint8_t MIDIKeyVelocity); virtual double GetSampleAttenuation(); + virtual void ProcessGroupEvent(RTList::Iterator& itEvent); private: - ::LinuxSampler::gig::EGADSR EG1; // TODO: add a fine-tuned version for SF2, or maybe use sfz v1 instead of gig + ::LinuxSampler::sfz::EGADSR EG1; + ::LinuxSampler::gig::EGADSR EG2; // TODO: use sfz v1 instead of gig + ::sf2::Region* pPresetRegion; public: // FIXME: just made public for debugging (sanity check in Engine::RenderAudio()), should be changed to private before the final release // Attributes