![]() |
![]() |
![]() |
libinstpatch Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
IpatchVBankInst; #define IPATCH_VBANK_INST_NAME_SIZE IpatchVBankInst * ipatch_vbank_inst_new (void); #define ipatch_vbank_inst_get_regions (inst) IpatchVBankInst * ipatch_vbank_inst_first (IpatchIter *iter); IpatchVBankInst * ipatch_vbank_inst_next (IpatchIter *iter); void ipatch_vbank_inst_new_region (IpatchVBankInst *inst, IpatchItem *item); void ipatch_vbank_inst_set_midi_locale (IpatchVBankInst *inst, int bank, int program); void ipatch_vbank_inst_get_midi_locale (IpatchVBankInst *inst, int *bank, int *program); int ipatch_vbank_inst_compare (const IpatchVBankInst *p1, const IpatchVBankInst *p2);
VBank instruments are children of IpatchVBank objects and define individual instruments mapped to MIDI bank/program numbers and which reference items in other instrument files.
#define IPATCH_VBANK_INST_NAME_SIZE 64
Maximum length of a virtual bank instrument name.
IpatchVBankInst * ipatch_vbank_inst_new (void);
Create a new virtual bank instrument object.
Returns : |
New VBank instrument with a reference count of 1. Caller owns the reference and removing it will destroy the item. |
IpatchVBankInst * ipatch_vbank_inst_first (IpatchIter *iter);
Gets the first item in an instrument iterator. A convenience wrapper for
ipatch_iter_first()
.
|
Patch item iterator containing IpatchVBankInst items |
Returns : |
The first instrument in iter or NULL if empty.
|
IpatchVBankInst * ipatch_vbank_inst_next (IpatchIter *iter);
Gets the next item in an instrument iterator. A convenience wrapper for
ipatch_iter_next()
.
|
Patch item iterator containing IpatchVBankInst items |
Returns : |
The next instrument in iter or NULL if at the end of the list.
|
void ipatch_vbank_inst_new_region (IpatchVBankInst *inst, IpatchItem *item);
A convenience function for creating a new virtual bank region, adding it
to inst
and setting the region's referenced item to item
.
|
VBank instrument |
|
Referenced item for new region |
void ipatch_vbank_inst_set_midi_locale (IpatchVBankInst *inst, int bank, int program);
Sets the MIDI locale of an instrument (bank and program numbers).
|
Virtual bank instrument to set MIDI locale of |
|
MIDI bank number to assign to instrument |
|
MIDI program number to assign to instrument |
void ipatch_vbank_inst_get_midi_locale (IpatchVBankInst *inst, int *bank, int *program);
Gets the MIDI locale of a virtual bank instrument (bank and program numbers).
|
Virtual bank instrument to get MIDI locale from |
|
Location to store instrument's MIDI bank number or NULL
|
|
Location to store instrument's MIDI program number or NULL
|
int ipatch_vbank_inst_compare (const IpatchVBankInst *p1, const IpatchVBankInst *p2);
Virtual bank instrument comparison function for sorting. Compare two instruments by their MIDI bank:program numbers. Note that this function is compatible with GCompareFunc and can therefore be used with g_list_sort, etc.
|
First instrument in comparison |
|
Second instrument in comparison |
Returns : |
Comparison result that is less than, equal to, or greater than zero
if p1 is found, respectively, to be less than, to match, or be greater
than p2 .
|