libgig 4.3.0
|
Group of instrument scripts (gig format extension). More...
#include <gig.h>
Public Member Functions | |
Script * | GetScript (uint index) |
Get instrument script. | |
Script * | AddScript () |
Add new instrument script. | |
void | DeleteScript (Script *pScript) |
Delete an instrument script. | |
Public Attributes | |
String | Name |
Name of this script group. For example to be displayed in an instrument editor. | |
Protected Member Functions | |
ScriptGroup (File *file, RIFF::List *lstRTIS) | |
void | LoadScripts () |
virtual void | UpdateChunks (progress_t *pProgress) |
Apply this script group to the respective RIFF chunks. | |
virtual void | DeleteChunks () |
Remove all RIFF chunks associated with this ScriptGroup object. | |
virtual void | UpdateChunks (progress_t *pProgress)=0 |
Apply object's changes to the respective RIF::Chunks. | |
Group of instrument scripts (gig format extension).
This class is simply used to sort a bunch of real-time instrument scripts into individual groups. This allows instrument designers and script developers to keep scripts in a certain order while working with a larger amount of scripts in an instrument editor.
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.
|
protected |
Script * gig::ScriptGroup::AddScript | ( | ) |
Add new instrument script.
Adds a new real-time instrument script to the file. The script is not actually used / executed unless it is referenced by an instrument to be used. This is similar to samples, which you can add to a file, without an instrument necessarily actually using it.
You have to call Save() to make this persistent to the file.
Definition at line 4864 of file gig.cpp.
Referenced by gig::File::AddContentOf().
|
protectedvirtual |
Remove all RIFF chunks associated with this ScriptGroup object.
At the moment ScriptGroup::DeleteChunks() does nothing. It is recommended to call this method explicitly though from deriving classes's own overridden implementation of this method to avoid potential future compatiblity issues.
See DLS::Storage::DeleteChunks() for details.
Implements DLS::Storage.
Definition at line 4810 of file gig.cpp.
Referenced by gig::File::DeleteScriptGroup().
void gig::ScriptGroup::DeleteScript | ( | Script * | pScript | ) |
Delete an instrument script.
This will delete the given real-time instrument script. References of instruments that are using that script will be removed accordingly.
You have to call Save() to make this persistent to the file.
pScript | - script to delete |
gig::Exception | if given script could not be found |
Definition at line 4881 of file gig.cpp.
References RIFF::List::DeleteSubChunk(), and RIFF::Chunk::GetParent().
Referenced by gig::File::DeleteScriptGroup().
Script * gig::ScriptGroup::GetScript | ( | uint | index | ) |
Get instrument script.
Returns the real-time instrument script with the given index.
index | - number of the sought script (0..n) |
Definition at line 4845 of file gig.cpp.
Referenced by gig::File::AddContentOf(), and gig::File::DeleteScriptGroup().
|
pure virtualinherited |
Apply object's changes to the respective RIF::Chunks.
This abstract interface method is intended to be implemented by the deriving classes by updating the respective RIFF chunks associated with the object such that those RIFF chunks reflect the object's current data (i.e. object's current member variables). So the purpose of this method is to prepare for saving the object's current state persistently to the actual RIFF file.
After returning from this method the changes are just scheduled to be saved to the RIFF file, it is required to call File::Save() subsequently to make the changes actually persistent on file level.
Usually there is no need to call this method directly from an application. This method is called automatically by libgig if one of the respective API methods is called to save the file persistently to disk (i.e. DLS::File::Save() or gig::File::Save()).
pProgress | - callback function for progress notification |
Implemented in DLS::Articulation, DLS::Articulator, DLS::File, DLS::Info, DLS::Instrument, DLS::Region, DLS::Resource, DLS::Sample, and DLS::Sampler.
|
protectedvirtual |
Apply this script group 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 4822 of file gig.cpp.
References RIFF::List::AddSubList(), RIFF::List::GetSubList(), and Name.
String gig::ScriptGroup::Name |
Name of this script group. For example to be displayed in an instrument editor.
Definition at line 1232 of file gig.h.
Referenced by gig::File::AddContentOf(), and UpdateChunks().