![]() |
![]() |
![]() |
libInstPatch Reference Manual | ![]() |
---|---|---|---|---|
IpatchSF2Inst; IpatchSF2InstClass; IpatchSF2Inst* ipatch_sf2_inst_new (void); #define ipatch_sf2_inst_get_zones (inst) IpatchSF2Inst* ipatch_sf2_inst_first (IpatchIter *iter); IpatchSF2Inst* ipatch_sf2_inst_next (IpatchIter *iter); void ipatch_sf2_inst_new_zone (IpatchSF2Inst *inst, IpatchSF2Sample *sample); gboolean ipatch_sf2_inst_has_global_zone (IpatchSF2Inst *inst); void ipatch_sf2_inst_set_name (IpatchSF2Inst *inst, const char *name); char* ipatch_sf2_inst_get_name (IpatchSF2Inst *inst);
IpatchSF2Inst* ipatch_sf2_inst_new (void);
Create a new SoundFont instrument object.
Returns : | New SoundFont 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). |
IpatchSF2Inst* ipatch_sf2_inst_first (IpatchIter *iter);
Gets the first item in an instrument iterator. A convenience wrapper for
ipatch_iter_first()
.
iter : |
Patch item iterator containing IpatchSF2Inst items |
Returns : | The first instrument in iter or NULL if empty.
|
IpatchSF2Inst* ipatch_sf2_inst_next (IpatchIter *iter);
Gets the next item in an instrument iterator. A convenience wrapper for
ipatch_iter_next()
.
iter : |
Patch item iterator containing IpatchSF2Inst items |
Returns : | The next instrument in iter or NULL if at the end of the list.
|
void ipatch_sf2_inst_new_zone (IpatchSF2Inst *inst, IpatchSF2Sample *sample);
A convenience function for quickly creating a new instrument zone, adding it
to inst
and setting the zone's referenced sample to sample
.
inst : |
SoundFont instrument |
sample : |
Referenced sample for new zone or NULL to create a global zone
|
gboolean ipatch_sf2_inst_has_global_zone (IpatchSF2Inst *inst);
Check if an instrument has a global zone (zone without a referenced sample).
void ipatch_sf2_inst_set_name (IpatchSF2Inst *inst, const char *name);
Sets the name of a SoundFont instrument.
inst : |
Instrument to set name of |
name : |
Value to set name to |
char* ipatch_sf2_inst_get_name (IpatchSF2Inst *inst);
Gets the name of a SoundFont instrument.
inst : |
Instrument to get name of |
Returns : | Name of instrument or NULL if not set. String value should be
freed when finished with it.
|