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

Diff of /linuxsampler/trunk/src/engines/sfz/sfz.h

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

revision 2018 by iliev, Tue Oct 27 19:04:57 2009 UTC revision 2021 by iliev, Fri Oct 30 16:36:20 2009 UTC
# Line 46  namespace sfz Line 46  namespace sfz
46      class Group;      class Group;
47      class Instrument;      class Instrument;
48      class File;      class File;
49        
50        class Sample : public LinuxSampler::SampleFileBase<Region> {
51            public:
52                Sample(String File, bool DontClose = false) : LinuxSampler::SampleFileBase<Region>(File, DontClose) { }
53                virtual ~Sample() { }
54        };
55    
56      // Enumerations      // Enumerations
57      enum sw_vel_t    { VEL_CURRENT, VEL_PREVIOUS };      enum sw_vel_t    { VEL_CURRENT, VEL_PREVIOUS };
58      enum off_mode_t  { OFF_FAST, OFF_NORMAL };      enum off_mode_t  { OFF_FAST, OFF_NORMAL };
59      enum loop_mode_t { NO_LOOP, ONE_SHOT, LOOP_CONTINOUS, LOOP_SUSTAIN };      enum loop_mode_t { NO_LOOP, ONE_SHOT, LOOP_CONTINUOUS, LOOP_SUSTAIN };
60      enum curve_t     { GAIN, POWER };      enum curve_t     { GAIN, POWER };
61      enum filter_t    { LPF_1P, HPF_1P, BPF_1P, BRF_1P, APF_1P,      enum filter_t    { LPF_1P, HPF_1P, BPF_1P, BRF_1P, APF_1P,
62                         LPF_2P, HPF_2P, BPF_2P, BRF_2P, PKF_2P,                         LPF_2P, HPF_2P, BPF_2P, BRF_2P, PKF_2P,
# Line 60  namespace sfz Line 66  namespace sfz
66      typedef unsigned char trigger_t;      typedef unsigned char trigger_t;
67      typedef unsigned char uint8_t;      typedef unsigned char uint8_t;
68    
69      class SampleManager : public LinuxSampler::SampleManager<LinuxSampler::SampleFile, Region> {      class SampleManager : public LinuxSampler::SampleManager<Sample, Region> {
70      public:      public:
71          LinuxSampler::SampleFile* FindSample(std::string samplePath);          Sample* FindSample(std::string samplePath);
72    
73      protected:      protected:
74          virtual void OnSampleInUse(LinuxSampler::SampleFile* pSample) {          virtual void OnSampleInUse(Sample* pSample) {
75              pSample->Open();              pSample->Open();
76          }          }
77    
78          virtual void OnSampleInNotUse(LinuxSampler::SampleFile* pSample) {          virtual void OnSampleInNotUse(Sample* pSample) {
79              pSample->Close();              pSample->Close();
80          }          }
81      };      };
# Line 338  namespace sfz Line 344  namespace sfz
344          Region();          Region();
345          virtual ~Region();          virtual ~Region();
346    
347          LinuxSampler::SampleFile* pSample;          Sample* pSample;
348          LinuxSampler::SampleFile* GetSample(bool create = true);          Sample* GetSample(bool create = true);
349          void DestroySampleIfNotUsed();          void DestroySampleIfNotUsed();
350    
351          Region*      GetParent() { return this; }; // needed by EngineBase          Region*      GetParent() { return this; }; // needed by EngineBase
352          Instrument*  GetInstrument() { return pInstrument; }          Instrument*  GetInstrument() { return pInstrument; }
353          void         SetInstrument(Instrument* pInstrument) { this->pInstrument = pInstrument; }          void         SetInstrument(Instrument* pInstrument) { this->pInstrument = pInstrument; }
354    
355            bool HasLoop();
356            uint GetLoopStart();
357            uint GetLoopEnd();
358            uint GetLoopCount();
359    
360          /// Return true if region is triggered by key          /// Return true if region is triggered by key
361          bool OnKey(uint8_t chan, uint8_t key, uint8_t vel,          bool OnKey(uint8_t chan, uint8_t key, uint8_t vel,
362                 int bend, uint8_t bpm, uint8_t chanaft, uint8_t polyaft,                 int bend, uint8_t bpm, uint8_t chanaft, uint8_t polyaft,

Legend:
Removed from v.2018  
changed lines
  Added in v.2021

  ViewVC Help
Powered by ViewVC