76 typedef std::string String;
108 bool IsCompressed()
const;
109 uint8_t CompressionID()
const;
110 bool Use2ndStart()
const;
111 String FileName()
const;
119 unsigned long GetPos()
const;
120 unsigned long Read(
void* pBuffer,
unsigned long SampleCount);
144 String FullSampleFileName()
const;
180 int GetRegionCount()
const;
181 bool Use2ndStart()
const;
182 String FileName()
const;
186 std::vector<KMPRegion*> regions;
Korg format specific exception.
String Name16
Human readable name of the instrument for display purposes (not the file name). Since this name is al...
uint8_t Attributes
Bit field of attribute flags (ATM only bit 0 is used, better call Use2ndStart() instead of accessing ...
String Name24
Longer Human readable name (24 characters) of the instrument for display purposes (not the file name)...
String Name() const
Returns the long name (Name24) if it was stored in the file, otherwise returns the short name (Name16...
Region of a .KMP multi sample file.
String SampleFileName
Base file name of sample file (12 bytes). Call FullSampleFileName() for getting the file name with pa...
int8_t Tune
-99..+99 cents
int8_t Level
-99..+99 cents
uint8_t OriginalKey
Note of sample's original pitch, a.k.a. "root key" (0..127).
int8_t FilterCutoff
-50..0
uint8_t TopKey
The end of this region on the keyboard (0..127). The start of this region is given by TopKey+1 of the...
uint8_t BitDepth
i.e. 8 or 16
uint8_t Channels
Number of audio channels (seems to be always 1, thus Mono for all Korg sound files ATM).
buffer_t GetCache() const
Returns current cached sample points.
unsigned long Read(void *pBuffer, unsigned long SampleCount)
Reads SampleCount number of sample points from the current position into the buffer pointed by pBuffe...
unsigned long SetPos(unsigned long SampleCount, RIFF::stream_whence_t Whence=RIFF::stream_start)
Sets the position within the sample (in sample points, not in bytes).
uint32_t SamplePoints
Currently the library expects all Korg samples to be Mono, thus the value here might be incorrect in ...
String Name
Sample name for drums (since this name is always stored with 16 bytes, this name must never be longer...
buffer_t LoadSampleData()
Loads the whole sample wave into RAM.
int FrameSize() const
Returns the size of one sample point of this sample in bytes.
uint32_t SampleRate
i.e. 44100
buffer_t LoadSampleDataWithNullSamplesExtension(uint NullSamplesCount)
Loads the whole sample wave into RAM.
void ReleaseSampleData()
Frees the cached sample from RAM if loaded with LoadSampleData() previously.
uint8_t Attributes
Bit field of flags, better call IsCompressed(), CompressionID() and Use2ndStart() instead of accessin...
unsigned long GetPos() const
Returns the current position in the sample (in sample points).
Will be thrown whenever an error occurs while handling a RIFF file.
KORG sound format specific classes and definitions.
String libraryVersion()
Returns version of this C++ library.
String libraryName()
Returns the name of this C++ library.
stream_whence_t
File stream position dependent to these relations.
Pointer address and size of a buffer.