/[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 2101 by persson, Sun May 30 11:40:31 2010 UTC revision 2106 by persson, Sun Jul 4 12:50:51 2010 UTC
# Line 47  namespace sfz Line 47  namespace sfz
47      class Group;      class Group;
48      class Instrument;      class Instrument;
49      class File;      class File;
50        class LookupTable;
51    
52      class Sample : public LinuxSampler::SampleFileBase<Region> {      class Sample : public LinuxSampler::SampleFileBase<Region> {
53          public:          public:
# Line 297  namespace sfz Line 298  namespace sfz
298          int   lovel;     int   hivel;          int   lovel;     int   hivel;
299          Array<int> locc; Array<int> hicc;          Array<int> locc; Array<int> hicc;
300          int   lobend;    int   hibend;          int   lobend;    int   hibend;
301          int   lobpm;     int   hibpm;          float lobpm;     float hibpm;
302          int   lochanaft; int   hichanaft;          int   lochanaft; int   hichanaft;
303          int   lopolyaft; int   hipolyaft;          int   lopolyaft; int   hipolyaft;
304          int   loprog;    int   hiprog;          int   loprog;    int   hiprog;
# Line 406  namespace sfz Line 407  namespace sfz
407    
408      class Query {      class Query {
409      public:      public:
         Query(const Instrument& instrument);  
         Region* next();  
410          uint8_t chan;        // MIDI channel          uint8_t chan;        // MIDI channel
411          uint8_t key;         // MIDI note      TODO: or controller          uint8_t key;         // MIDI note      TODO: or controller
412          uint8_t vel;         // MIDI velocity          uint8_t vel;         // MIDI velocity
# Line 423  namespace sfz Line 422  namespace sfz
422          bool* sw;            // state of region key switches, 128 possible values          bool* sw;            // state of region key switches, 128 possible values
423          uint8_t last_sw_key; // last key pressed in the key switch range          uint8_t last_sw_key; // last key pressed in the key switch range
424          uint8_t prev_sw_key; // previous note value          uint8_t prev_sw_key; // previous note value
425    
426            void search(const Instrument* pInstrument);
427            Region* next();
428      private:      private:
429          std::vector<Region*>::const_iterator i;          LinuxSampler::ArrayList<Region*>* pRegionList;
430          std::vector<Region*>::const_iterator regions_end;          int regionIndex;
431      };      };
432    
433      /////////////////////////////////////////////////////////////      /////////////////////////////////////////////////////////////
# Line 452  namespace sfz Line 454  namespace sfz
454          uint GetLoopEnd();          uint GetLoopEnd();
455          uint GetLoopCount();          uint GetLoopCount();
456    
457          /// Return true if region is triggered by key          /// Return true if region is triggered by key. Region is
458            /// assumed to come from a search in the lookup table.
459          bool OnKey(const Query& q);          bool OnKey(const Query& q);
460    
461          /// Return true if region is triggered by control change          /// Return true if region is triggered by control change
# Line 492  namespace sfz Line 495  namespace sfz
495          /// List of Regions belonging to this Instrument          /// List of Regions belonging to this Instrument
496          std::vector<Region*> regions;          std::vector<Region*> regions;
497    
498          friend class sfz::File;          friend class File;
499            friend class Query;
500    
501      private:      private:
502          std::string name;          std::string name;
503          std::vector<bool> KeyBindings;          std::vector<bool> KeyBindings;
504          std::vector<bool> KeySwitchBindings;          std::vector<bool> KeySwitchBindings;
505          SampleManager* pSampleManager;          SampleManager* pSampleManager;
506            LookupTable* pLookupTable;
507      };      };
508    
509      /////////////////////////////////////////////////////////////      /////////////////////////////////////////////////////////////

Legend:
Removed from v.2101  
changed lines
  Added in v.2106

  ViewVC Help
Powered by ViewVC