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