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 |
|
|
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. */ |
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; |
524 |
unsigned long SetPos(unsigned long SampleCount, RIFF::stream_whence_t Whence = RIFF::stream_start); |
unsigned long SetPos(unsigned long SampleCount, RIFF::stream_whence_t Whence = RIFF::stream_start); |
525 |
unsigned long GetPos(); |
unsigned long GetPos(); |
526 |
unsigned long Read(void* pBuffer, unsigned long SampleCount, buffer_t* pExternalDecompressionBuffer = NULL); |
unsigned long Read(void* pBuffer, unsigned long SampleCount, buffer_t* pExternalDecompressionBuffer = NULL); |
527 |
unsigned long ReadAndLoop(void* pBuffer, unsigned long SampleCount, playback_state_t* pPlaybackState, buffer_t* pExternalDecompressionBuffer = NULL); |
unsigned long ReadAndLoop(void* pBuffer, unsigned long SampleCount, playback_state_t* pPlaybackState, DimensionRegion* pDimRgn, buffer_t* pExternalDecompressionBuffer = NULL); |
528 |
unsigned long Write(void* pBuffer, unsigned long SampleCount); |
unsigned long Write(void* pBuffer, unsigned long SampleCount); |
529 |
virtual void UpdateChunks(); |
virtual void UpdateChunks(); |
530 |
protected: |
protected: |
588 |
void DeleteDimension(dimension_def_t* pDimDef); |
void DeleteDimension(dimension_def_t* pDimDef); |
589 |
virtual void UpdateChunks(); |
virtual void UpdateChunks(); |
590 |
protected: |
protected: |
|
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. |
|
|
|
|
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; |