libgig  4.2.0
Korg Namespace Reference

KORG sound format specific classes and definitions. More...

Classes

class  Exception
 Korg format specific exception. More...
 
class  KMPInstrument
 .KMP multi sample file More...
 
class  KMPRegion
 Region of a .KMP multi sample file. More...
 
class  KSFSample
 .KSF audio sample file More...
 

Typedefs

typedef std::string String
 
typedef gig::buffer_t buffer_t
 

Functions

String libraryName ()
 Returns the name of this C++ library. More...
 
String libraryVersion ()
 Returns version of this C++ library. More...
 
template<unsigned int SZ>
String readText (RIFF::Chunk *ck)
 
String readText24 (RIFF::Chunk *ck)
 Read 24 bytes of ASCII text from given chunk and return it as String.
 
String readText16 (RIFF::Chunk *ck)
 Read 16 bytes of ASCII text from given chunk and return it as String.
 
String readText12 (RIFF::Chunk *ck)
 Read 12 bytes of ASCII text from given chunk and return it as String.
 
String removeFileTypeExtension (const String &filename)
 For example passing "FOO.KMP" will return "FOO".
 

Detailed Description

KORG sound format specific classes and definitions.

Classes in this namespace provide access to Korg's sample based instrument files which are used by Korg Trinity, Triton, OASYS, M3 and Kronos synthesizer keyboards.

At the moment these classes only support read support, but no write support yet.

Sample based instruments are spread in KORG's format over individual files:

  • .KSF Sample File (KSFSample): contains exactly one audio sample (mono). So each audio sample is stored in its own .KSF file. It also stores some basic meta informations for the sample, i.e. loop points.
  • .KMP Multi Sample File (KMPInstrument): groups individual .KSF sample files to one logical group of samples. This file just references the actual .KSF files by file name. It also provides some articulation informations, for example it maps the individual samples to regions on the keyboard, but it does not even provide support for velocity splits or layers.

The upper two file types are used by KORG for many years and their internal file format has remained nearly unchanged over that long period, and has also remained consistent over many different synthesizer keyboard models and series. Due to this however, the articulation informations stored in those two files are too primitive for being used directly on modern keyboards. That's why the following file type exists as well:

  • .PCG Program File: contains a complete bank list of "programs" (sounds / virtual instruments) and "combinations" (combi sounds), along with all their detailed articulation informations and references to the .KSF sample files. The precise internal format of this file type differs quite a lot between individual keyboard models, series and even between different OS versions of the same keyboard model. The individual sound definitions in this file references the individual (separate) sound files, defines velocity splits, groups individual mono samples to stereo samples and stores all synthesis model specific sound settings like envelope generator settings, LFO settings, MIDI controllers, filter settings, etc.

Unfortunately this library does not provide support for .PCG files yet.

Function Documentation

◆ libraryName()

String Korg::libraryName ( )

Returns the name of this C++ library.

This is usually "libgig" of course. This call is equivalent to RIFF::libraryName() and gig::libraryName().

Definition at line 452 of file Korg.cpp.

◆ libraryVersion()

String Korg::libraryVersion ( )

Returns version of this C++ library.

This call is equivalent to RIFF::libraryVersion() and gig::libraryVersion().

Definition at line 460 of file Korg.cpp.