libgig  3.3.0.svn20
gig::Script Class Reference

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...
 
ScriptGroupGetGroup () 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 ()
 
void RemoveAllScriptReferences ()
 

Friends

class ScriptGroup
 
class Instrument
 

Detailed Description

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.

Definition at line 863 of file gig.h.

Member Enumeration Documentation

Enumerator
COMPRESSION_NONE 

Is not compressed at all (default).

Definition at line 868 of file gig.h.

Enumerator
ENCODING_ASCII 

Standard 8 bit US ASCII character encoding (default).

Definition at line 865 of file gig.h.

Enumerator
LANGUAGE_NKSP 

NKSP stands for "Is Not KSP" (default).

Definition at line 871 of file gig.h.

Constructor & Destructor Documentation

gig::Script::~Script ( )
protectedvirtual

Definition at line 4140 of file gig.cpp.

Member Function Documentation

ScriptGroup * gig::Script::GetGroup ( ) const

Returns the script group this script currently belongs to.

Each script is a member of exactly one ScriptGroup.

Returns
current script group

Definition at line 4215 of file gig.cpp.

String gig::Script::GetScriptAsText ( )

Returns the current script (i.e.

as source code) in text format.

Definition at line 4146 of file gig.cpp.

void gig::Script::RemoveAllScriptReferences ( )
protected
void gig::Script::SetGroup ( ScriptGroup pGroup)

Move this script from its current ScriptGroup to another ScriptGroup given by pGroup.

Parameters
pGroup- script's new group

Definition at line 4202 of file gig.cpp.

References RIFF::Chunk::GetParent(), and RIFF::List::MoveSubChunk().

void gig::Script::SetScriptAsText ( const String text)

Replaces the current script with the new script source code text given by text.

Parameters
text- new script source code

Definition at line 4159 of file gig.cpp.

void gig::Script::UpdateChunks ( )
protected

Friends And Related Function Documentation

friend class Instrument
friend

Definition at line 891 of file gig.h.

friend class ScriptGroup
friend

Definition at line 890 of file gig.h.

Member Data Documentation

bool gig::Script::Bypass

Global bypass: if enabled, this script shall not be executed by the sampler for any instrument.

Definition at line 879 of file gig.h.

Referenced by Script(), and UpdateChunks().

Compression_t gig::Script::Compression

Whether the script was/should be compressed, and if so, which compression algorithm shall be used.

Definition at line 876 of file gig.h.

Referenced by Script(), and UpdateChunks().

Encoding_t gig::Script::Encoding

Format the script's source code text is encoded with.

Definition at line 877 of file gig.h.

Referenced by Script(), and UpdateChunks().

Language_t gig::Script::Language

Programming language and dialect the script is written in.

Definition at line 878 of file gig.h.

Referenced by Script(), and UpdateChunks().

String gig::Script::Name

Arbitrary name of the script, which may be displayed i.e. in an instrument editor.

Definition at line 875 of file gig.h.

Referenced by Script(), and UpdateChunks().


The documentation for this class was generated from the following files: