libinstpatch Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#define IPATCH_VBANK_INFO_COUNT IpatchVBank; #define IPATCH_VBANK_PARSER_VERSION IpatchVBank * ipatch_vbank_new (void
); #define ipatch_vbank_get_insts (vbank) IpatchVBankInst * ipatch_vbank_find_inst (IpatchVBank *vbank
,const char *name
,int bank
,int program
,const IpatchVBankInst *exclude
); char * ipatch_vbank_make_unique_name (IpatchVBank *vbank
,const char *name
,const IpatchVBankInst *exclude
);
"author" gchar* : Read / Write "comment" gchar* : Read / Write "date" gchar* : Read / Write "engine" gchar* : Read / Write "name" gchar* : Read / Write "parser-version" gchar* : Read / Write "require-version" gchar* : Read / Write
Virtual banks provide the capability of creating new instrument MIDI maps from components from other files of possibly different types.
#define IPATCH_VBANK_PARSER_VERSION "1.0"
Current IVBank parser version.
IpatchVBank * ipatch_vbank_new (void
);
Create a new virtual bank base object.
Returns : |
New IVBank base object with a reference count of 1. Caller owns the reference and removing it will destroy the item. |
IpatchVBankInst * ipatch_vbank_find_inst (IpatchVBank *vbank
,const char *name
,int bank
,int program
,const IpatchVBankInst *exclude
);
Find an instrument by name or bank:preset MIDI numbers. If instrument name
and bank
:program
are specified then match for either condition.
If an instrument is found its reference count is incremented before it
is returned. The caller is responsible for removing the reference
with g_object_unref()
when finished with it.
|
VBank to search in |
|
Name of instrument to find or NULL to match any name
|
|
MIDI bank number of instrument to search for or -1 to not search by MIDI bank:program numbers |
|
MIDI program number of instrument to search for, only used
if bank is 0-128
|
|
An instrument to exclude from the search or NULL
|
Returns : |
The matching instrument or NULL if not found. Remember to unref
the item when finished with it.
|
char * ipatch_vbank_make_unique_name (IpatchVBank *vbank
,const char *name
,const IpatchVBankInst *exclude
);
Generates a unique instrument name for vbank
. The name
parameter is used as a base and is modified, by appending a number, to
make it unique (if necessary). The exclude
parameter is used to exclude
an existing vbank
instrument from the search.
MT-Note: To ensure that an item is actually unique before being
added to a VBank object, ipatch_container_add_unique()
should be
used.
|
VBank item |
|
An initial name to use or NULL |
|
An item to exclude from search or NULL |
Returns : |
A new unique name which should be freed when finished with it. |