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