/[svn]/libgig/trunk/src/gig.h
ViewVC logotype

Diff of /libgig/trunk/src/gig.h

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

revision 809 by schoenebeck, Tue Nov 22 11:26:55 2005 UTC revision 858 by persson, Sat May 6 11:29:29 2006 UTC
# Line 130  namespace gig { Line 130  namespace gig {
130      /** Defines how the filter cutoff frequency is controlled by. */      /** Defines how the filter cutoff frequency is controlled by. */
131      typedef enum {      typedef enum {
132          vcf_cutoff_ctrl_none         = 0x00,          vcf_cutoff_ctrl_none         = 0x00,
133          vcf_cutoff_ctrl_none2        = 0x01,  ///< The difference betwheen none and none2 is unknown          vcf_cutoff_ctrl_none2        = 0x01,  ///< The difference between none and none2 is unknown
134          vcf_cutoff_ctrl_modwheel     = 0x81,  ///< Modulation Wheel (MIDI Controller 1)          vcf_cutoff_ctrl_modwheel     = 0x81,  ///< Modulation Wheel (MIDI Controller 1)
135          vcf_cutoff_ctrl_effect1      = 0x8c,  ///< Effect Controller 1 (Coarse, MIDI Controller 12)          vcf_cutoff_ctrl_effect1      = 0x8c,  ///< Effect Controller 1 (Coarse, MIDI Controller 12)
136          vcf_cutoff_ctrl_effect2      = 0x8d,  ///< Effect Controller 2 (Coarse, MIDI Controller 13)          vcf_cutoff_ctrl_effect2      = 0x8d,  ///< Effect Controller 2 (Coarse, MIDI Controller 13)
# Line 240  namespace gig { Line 240  namespace gig {
240       * into the corresponding dimension bit number.       * into the corresponding dimension bit number.
241       */       */
242      typedef enum {      typedef enum {
243          split_type_normal,         ///< dimension value between 0-127, no custom range of zones          split_type_normal,         ///< dimension value between 0-127
         split_type_customvelocity, ///< a velocity dimension split with custom range definition for each zone (if a velocity dimension split has no custom defined zone ranges then it's also just of type split_type_normal)  
244          split_type_bit             ///< dimension values are already the sought bit number          split_type_bit             ///< dimension values are already the sought bit number
245      } split_type_t;      } split_type_t;
246    
# Line 251  namespace gig { Line 250  namespace gig {
250          uint8_t      bits;       ///< Number of "bits" (1 bit = 2 splits/zones, 2 bit = 4 splits/zones, 3 bit = 8 splits/zones,...).          uint8_t      bits;       ///< Number of "bits" (1 bit = 2 splits/zones, 2 bit = 4 splits/zones, 3 bit = 8 splits/zones,...).
251          uint8_t      zones;      ///< Number of zones the dimension has.          uint8_t      zones;      ///< Number of zones the dimension has.
252          split_type_t split_type; ///< Intended for internal usage: will be used to convert a dimension value into the corresponding dimension bit number.          split_type_t split_type; ///< Intended for internal usage: will be used to convert a dimension value into the corresponding dimension bit number.
         range_t*     ranges;     ///< Intended for internal usage: Points to the beginning of a range_t array which reflects the value ranges of each dimension zone (only if custom defined ranges are defined, is NULL otherwise).  
253          float        zone_size;  ///< Intended for internal usage: reflects the size of each zone (128/zones) for normal split types only, 0 otherwise.          float        zone_size;  ///< Intended for internal usage: reflects the size of each zone (128/zones) for normal split types only, 0 otherwise.
   
         dimension_def_t& operator=(const dimension_def_t& arg);  
254      };      };
255    
256      /** Defines which frequencies are filtered by the VCF. */      /** Defines which frequencies are filtered by the VCF. */
# Line 434  namespace gig { Line 430  namespace gig {
430              // overridden methods              // overridden methods
431              virtual void UpdateChunks();              virtual void UpdateChunks();
432          protected:          protected:
433                uint8_t* VelocityTable; ///< For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity MIDI value to dimension bit number.
434              DimensionRegion(RIFF::List* _3ewl);              DimensionRegion(RIFF::List* _3ewl);
435             ~DimensionRegion();             ~DimensionRegion();
436              friend class Region;              friend class Region;
# Line 591  namespace gig { Line 588  namespace gig {
588              void             DeleteDimension(dimension_def_t* pDimDef);              void             DeleteDimension(dimension_def_t* pDimDef);
589              virtual void     UpdateChunks();              virtual void     UpdateChunks();
590          protected:          protected:
             typedef std::list<dimension_def_t*> DimensionList;  
   
             uint8_t VelocityTable[128]; ///< For velocity dimensions with custom defined zone ranges only: used for fast converting from velocity MIDI value to dimension bit number.  
             DimensionList DimensionDefinitions;  
   
591              Region(Instrument* pInstrument, RIFF::List* rgnList);              Region(Instrument* pInstrument, RIFF::List* rgnList);
592              void LoadDimensionRegions(RIFF::List* rgn);              void LoadDimensionRegions(RIFF::List* rgn);
593              void UpdateVelocityTable(dimension_def_t* pDimDef);              void UpdateVelocityTable();
594              Sample* GetSampleFromWavePool(unsigned int WavePoolTableIndex, progress_t* pProgress = NULL);              Sample* GetSampleFromWavePool(unsigned int WavePoolTableIndex, progress_t* pProgress = NULL);
595             ~Region();             ~Region();
596              friend class Instrument;              friend class Instrument;
# Line 637  namespace gig { Line 629  namespace gig {
629              // own methods              // own methods
630              Region*   GetRegion(unsigned int Key);              Region*   GetRegion(unsigned int Key);
631          protected:          protected:
             Region**  pRegions;            ///< Pointer array to the regions  
632              Region*   RegionKeyTable[128]; ///< fast lookup for the corresponding Region of a MIDI key              Region*   RegionKeyTable[128]; ///< fast lookup for the corresponding Region of a MIDI key
             int       RegionIndex;  
633    
634              Instrument(File* pFile, RIFF::List* insList, progress_t* pProgress = NULL);              Instrument(File* pFile, RIFF::List* insList, progress_t* pProgress = NULL);
635             ~Instrument();             ~Instrument();
# Line 674  namespace gig { Line 664  namespace gig {
664              Instrument* GetInstrument(uint index, progress_t* pProgress = NULL);              Instrument* GetInstrument(uint index, progress_t* pProgress = NULL);
665              Instrument* AddInstrument();              Instrument* AddInstrument();
666              void        DeleteInstrument(Instrument* pInstrument);              void        DeleteInstrument(Instrument* pInstrument);
            ~File();  
667          protected:          protected:
668              typedef std::list<Sample*>     SampleList;              // overridden protected methods from DLS::File
669              typedef std::list<Instrument*> InstrumentList;              virtual void LoadSamples();
670                virtual void LoadInstruments();
671              SampleList*              pSamples;              // own protected methods
672              SampleList::iterator     SamplesIterator;              virtual void LoadSamples(progress_t* pProgress);
673              InstrumentList*          pInstruments;              virtual void LoadInstruments(progress_t* pProgress);
             InstrumentList::iterator InstrumentsIterator;  
   
             void LoadSamples(progress_t* pProgress = NULL);  
             void LoadInstruments(progress_t* pProgress = NULL);  
674              friend class Region;              friend class Region;
   
             std::list<RIFF::File*> ExtensionFiles;  
675      };      };
676    
677      /** Will be thrown whenever a gig specific error occurs while trying to access a Gigasampler File. */      /** Will be thrown whenever a gig specific error occurs while trying to access a Gigasampler File. */

Legend:
Removed from v.809  
changed lines
  Added in v.858

  ViewVC Help
Powered by ViewVC