libgig
4.0.0.6svn2980
|
Real-time instrument script (gig format extension). More...
#include <gig.h>
Public Types | |
enum | Encoding_t { ENCODING_ASCII = 0 } |
enum | Compression_t { COMPRESSION_NONE = 0 } |
enum | Language_t { LANGUAGE_NKSP = 0 } |
Public Member Functions | |
String | GetScriptAsText () |
Returns the current script (i.e. More... | |
void | SetScriptAsText (const String &text) |
Replaces the current script with the new script source code text given by text. More... | |
void | SetGroup (ScriptGroup *pGroup) |
Move this script from its current ScriptGroup to another ScriptGroup given by pGroup. More... | |
ScriptGroup * | GetGroup () const |
Returns the script group this script currently belongs to. More... | |
Public Attributes | |
String | Name |
Arbitrary name of the script, which may be displayed i.e. in an instrument editor. More... | |
Compression_t | Compression |
Whether the script was/should be compressed, and if so, which compression algorithm shall be used. More... | |
Encoding_t | Encoding |
Format the script's source code text is encoded with. More... | |
Language_t | Language |
Programming language and dialect the script is written in. More... | |
bool | Bypass |
Global bypass: if enabled, this script shall not be executed by the sampler for any instrument. More... | |
Protected Member Functions | |
Script (ScriptGroup *group, RIFF::Chunk *ckScri) | |
virtual | ~Script () |
void | UpdateChunks (progress_t *pProgress) |
Apply this script to the respective RIFF chunks. More... | |
void | RemoveAllScriptReferences () |
Friends | |
class | ScriptGroup |
class | Instrument |
Real-time instrument script (gig format extension).
Real-time instrument scripts are user supplied small programs which can be used by instrument designers to create custom behaviors and features not available in the stock sampler engine. Features which might be very exotic or specific for the respective instrument.
This is an extension of the GigaStudio format, thus a feature which was not available in the GigaStudio 4 software. It is currently only supported by LinuxSampler and gigedit. Scripts will not load with the original GigaStudio software.
You find more informations about Instrument Scripts on the LinuxSampler documentation site:
Enumerator | |
---|---|
LANGUAGE_NKSP |
NKSP stands for "Is Not KSP" (default). Refer to the NKSP Reference Manual for details about this script language. |
|
protected |
Definition at line 4101 of file gig.cpp.
References RIFF::Chunk::GetPos(), RIFF::Chunk::GetSize(), RIFF::Chunk::ReadUint32(), RIFF::Chunk::ReadUint8(), and RIFF::Chunk::SetPos().
ScriptGroup * gig::Script::GetGroup | ( | ) | const |
Returns the script group this script currently belongs to.
Each script is a member of exactly one ScriptGroup.
String gig::Script::GetScriptAsText | ( | ) |
|
protected |
Definition at line 4221 of file gig.cpp.
References gig::File::GetInstrument(), and gig::Instrument::RemoveScript().
Referenced by gig::ScriptGroup::DeleteScript().
void gig::Script::SetGroup | ( | ScriptGroup * | pGroup | ) |
Move this script from its current ScriptGroup to another ScriptGroup given by pGroup.
pGroup | - script's new group |
void gig::Script::SetScriptAsText | ( | const String & | text | ) |
|
protected |
Apply this script to the respective RIFF chunks.
You have to call File::Save() to make changes persistent.
Usually there is absolutely no need to call this method explicitly. It will be called automatically when File::Save() was called.
pProgress | - callback function for progress notification |
Definition at line 4166 of file gig.cpp.
References CHUNK_ID_SCRI.
|
friend |
|
friend |
bool gig::Script::Bypass |
Compression_t gig::Script::Compression |
Encoding_t gig::Script::Encoding |
Language_t gig::Script::Language |
String gig::Script::Name |