libgig
4.0.0.6svn2980
|
Group of Gigasampler samples. More...
#include <gig.h>
Public Member Functions | |
Sample * | GetFirstSample () |
Returns the first Sample of this Group. More... | |
Sample * | GetNextSample () |
Returns the next Sample of the Group. More... | |
void | AddSample (Sample *pSample) |
Move Sample given by pSample from another Group to this Group. More... | |
Public Attributes | |
String | Name |
Stores the name of this Group. More... | |
Protected Member Functions | |
Group (File *file, RIFF::Chunk *ck3gnm) | |
Constructor. More... | |
virtual | ~Group () |
virtual void | UpdateChunks (progress_t *pProgress) |
Update chunks with current group settings. More... | |
void | MoveAll () |
Move all members of this group to another group (preferably the 1st one except this). More... | |
Friends | |
class | File |
Group of Gigasampler samples.
Groups help to organize a huge collection of Gigasampler samples. Groups are not concerned at all for the synthesis, but they help sound library developers when working on complex instruments with an instrument editor (as long as that instrument editor supports it ;-).
A sample is always assigned to exactly one Group. This also means there is always at least one Group in a .gig file, no matter if you created one yet or not.
|
protected |
Constructor.
file | - pointer to the gig::File object |
ck3gnm | - pointer to 3gnm chunk associated with this group or NULL if this is a new Group |
Definition at line 5058 of file gig.cpp.
References sf2::LoadString().
void gig::Group::AddSample | ( | Sample * | pSample | ) |
Sample * gig::Group::GetFirstSample | ( | ) |
Returns the first Sample of this Group.
You have to call this method once before you use GetNextSample().
Notice: this method might block for a long time, in case the samples of this .gig file were not scanned yet
Definition at line 5114 of file gig.cpp.
Referenced by gig::File::DeleteGroup().
Sample * gig::Group::GetNextSample | ( | ) |
Returns the next Sample of the Group.
You have to call GetFirstSample() once before you can use this method. By calling this method multiple times it iterates through the Samples assigned to this Group.
Definition at line 5132 of file gig.cpp.
Referenced by gig::File::DeleteGroup().
|
protected |
Move all members of this group to another group (preferably the 1st one except this).
This method is called explicitly by File::DeleteGroup() thus when a Group was deleted. This code was intentionally not placed in the destructor!
Definition at line 5153 of file gig.cpp.
References AddSample(), CHUNK_ID_IARL, CHUNK_ID_IART, CHUNK_ID_ICMS, CHUNK_ID_ICMT, CHUNK_ID_ICOP, CHUNK_ID_ICRD, CHUNK_ID_IENG, CHUNK_ID_IGNR, CHUNK_ID_IKEY, CHUNK_ID_IMED, CHUNK_ID_INAM, CHUNK_ID_IPRD, CHUNK_ID_ISBJ, CHUNK_ID_ISFT, CHUNK_ID_ISRC, CHUNK_ID_ISRF, CHUNK_ID_ITCH, gig::File::VERSION_2, and gig::File::VERSION_3.
Referenced by gig::File::DeleteGroupOnly().
|
protectedvirtual |
Update chunks with current group settings.
Apply current Group field values to the respective 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 5079 of file gig.cpp.
References RIFF::List::AddSubList(), CHUNK_ID_3GNM, CHUNK_ID_PTBL, RIFF::List::GetFirstSubChunk(), RIFF::List::GetNextSubChunk(), RIFF::List::GetSubChunk(), RIFF::List::GetSubList(), LIST_TYPE_3GNL, LIST_TYPE_3GRI, and RIFF::List::MoveSubChunk().
String gig::Group::Name |
Stores the name of this Group.
Definition at line 1159 of file gig.h.
Referenced by gig::File::AddContentOf(), and gig::File::LoadGroups().