libinstpatch Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
IpatchDLS2Inst; #define IPATCH_DLS2_INST_BANK_MAX enum IpatchDLS2InstFlags; #define IPATCH_DLS2_INST_UNUSED_FLAG_SHIFT IpatchDLS2Inst * ipatch_dls2_inst_new (void
); #define ipatch_dls2_inst_get_regions (inst) IpatchDLS2Inst * ipatch_dls2_inst_first (IpatchIter *iter
); IpatchDLS2Inst * ipatch_dls2_inst_next (IpatchIter *iter
); char * ipatch_dls2_inst_get_info (IpatchDLS2Inst *inst
,guint32 fourcc
); void ipatch_dls2_inst_set_info (IpatchDLS2Inst *inst
,guint32 fourcc
,const char *val
); void ipatch_dls2_inst_set_midi_locale (IpatchDLS2Inst *inst
,int bank
,int program
); void ipatch_dls2_inst_get_midi_locale (IpatchDLS2Inst *inst
,int *bank
,int *program
); int ipatch_dls2_inst_compare (const IpatchDLS2Inst *p1
,const IpatchDLS2Inst *p2
); GSList * ipatch_dls2_inst_get_conns (IpatchDLS2Inst *inst
); void ipatch_dls2_inst_set_conn (IpatchDLS2Inst *inst
,const IpatchDLS2Conn *conn
); void ipatch_dls2_inst_unset_conn (IpatchDLS2Inst *inst
,const IpatchDLS2Conn *conn
); void ipatch_dls2_inst_unset_all_conns (IpatchDLS2Inst *inst
); guint ipatch_dls2_inst_conn_count (IpatchDLS2Inst *inst
);
GObject +----IpatchItem +----IpatchContainer +----IpatchDLS2Inst +----IpatchGigInst
"archive-location" gchar* : Read / Write "artist" gchar* : Read / Write "bank" gint : Read / Write "comment" gchar* : Read / Write "commissioned" gchar* : Read / Write "copyright" gchar* : Read / Write "date" gchar* : Read / Write "engineer" gchar* : Read / Write "genre" gchar* : Read / Write "keywords" gchar* : Read / Write "medium" gchar* : Read / Write "name" gchar* : Read / Write "percussion" gboolean : Read / Write "product" gchar* : Read / Write "program" gint : Read / Write "software" gchar* : Read / Write "source" gchar* : Read / Write "source-form" gchar* : Read / Write "subject" gchar* : Read / Write "technician" gchar* : Read / Write
Defines a DLS instrument object. DLS instruments are the toplevel objects in the DLS instrument file tree hierarchy.
typedef enum { IPATCH_DLS2_INST_PERCUSSION = 1 << IPATCH_CONTAINER_UNUSED_FLAG_SHIFT } IpatchDLS2InstFlags;
IpatchDLS2Inst * ipatch_dls2_inst_new (void
);
Create a new DLS instrument object.
Returns : |
New DLS instrument with a reference count of 1. Caller owns the reference and removing it will destroy the item, unless another reference is added (if its parented for example). |
IpatchDLS2Inst * ipatch_dls2_inst_first (IpatchIter *iter
);
Gets the first item in an instrument iterator. A convenience wrapper for
ipatch_iter_first()
.
|
Patch item iterator containing IpatchDLS2Inst items |
Returns : |
The first instrument in iter or NULL if empty.
|
IpatchDLS2Inst * ipatch_dls2_inst_next (IpatchIter *iter
);
Gets the next item in an instrument iterator. A convenience wrapper for
ipatch_iter_next()
.
|
Patch item iterator containing IpatchDLS2Inst items |
Returns : |
The next instrument in iter or NULL if at the end of the list.
|
char * ipatch_dls2_inst_get_info (IpatchDLS2Inst *inst
,guint32 fourcc
);
Get a DLS instrument info string by FOURCC integer ID (integer representation of a 4 character RIFF chunk ID, see IpatchRiff).
|
DLS instrument to get info from |
|
FOURCC integer id of INFO to get |
Returns : |
New allocated info string value or NULL if no info with the
given fourcc ID. String should be freed when finished with it.
|
void ipatch_dls2_inst_set_info (IpatchDLS2Inst *inst
,guint32 fourcc
,const char *val
);
Sets an INFO value in a DLS instrument object. Emits changed signal.
|
DLS instrument to set info of |
|
FOURCC integer ID of INFO to set |
|
Value to set info to or NULL to unset (clear) info.
|
void ipatch_dls2_inst_set_midi_locale (IpatchDLS2Inst *inst
,int bank
,int program
);
Sets the MIDI locale of a DLS instrument (bank and program numbers).
|
DLS instrument to set MIDI locale of |
|
MIDI bank number to assign to instrument |
|
MIDI program number to assign to instrument |
void ipatch_dls2_inst_get_midi_locale (IpatchDLS2Inst *inst
,int *bank
,int *program
);
Gets the MIDI locale of a DLS instrument (bank and program numbers).
int ipatch_dls2_inst_compare (const IpatchDLS2Inst *p1
,const IpatchDLS2Inst *p2
);
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.
FIXME: Also note that percussion instruments are sorted after regular ones.
|
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 .
|
GSList * ipatch_dls2_inst_get_conns (IpatchDLS2Inst *inst
);
Gets a list of connections from a DLS instrument. List should be freed with
ipatch_dls2_conn_list_free()
(free_conns set to TRUE
) when finished
with it.
|
Instrument to get connections from |
Returns : |
New list of connections (IpatchDLS2Conn) in inst or
NULL if no connections. Remember to free it when finished.
|
void ipatch_dls2_inst_set_conn (IpatchDLS2Inst *inst
,const IpatchDLS2Conn *conn
);
Set a global DLS connection in an instrument. See
ipatch_dls2_conn_list_set()
for more details.
|
DLS instrument |
|
Connection |
void ipatch_dls2_inst_unset_conn (IpatchDLS2Inst *inst
,const IpatchDLS2Conn *conn
);
Remove a global DLS connection from an instrument. See
ipatch_dls2_conn_list_unset()
for more details.
|
DLS instrument |
|
Connection |
void ipatch_dls2_inst_unset_all_conns (IpatchDLS2Inst *inst
);
Remove all global connections in an instrument.
|
DLS instrument |
guint ipatch_dls2_inst_conn_count (IpatchDLS2Inst *inst
);
Count number of connections in a instrument
|
Instrument to count connections in |
Returns : |
Count of connections |
"archive-location"
property"archive-location" gchar* : Read / Write
Location where subject is archived.
Default value: NULL
"bank"
property"bank" gint : Read / Write
MIDI bank number.
Allowed values: [0,16383]
Default value: 0
"commissioned"
property"commissioned" gchar* : Read / Write
Who commissioned the material.
Default value: NULL
"engineer"
property"engineer" gchar* : Read / Write
Engineers separated by "; ".
Default value: NULL
"keywords"
property"keywords" gchar* : Read / Write
Keywords (separated by "; ").
Default value: NULL
"medium"
property"medium" gchar* : Read / Write
Original medium of the material (record, CD, etc).
Default value: NULL
"percussion"
property"percussion" gboolean : Read / Write
Percussion instrument?.
Default value: FALSE
"program"
property"program" gint : Read / Write
MIDI program number.
Allowed values: [0,127]
Default value: 0
"source"
property"source" gchar* : Read / Write
Source of the original material.
Default value: NULL
"source-form"
property"source-form" gchar* : Read / Write
Original source that was digitized.
Default value: NULL
"technician"
property"technician" gchar* : Read / Write
Technician who sampled the material.
Default value: NULL