IpatchSF2Inst

IpatchSF2Inst — SoundFont instrument object

Synopsis




                    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);

Object Hierarchy


  GObject
   +----IpatchItem
         +----IpatchContainer
               +----IpatchSF2Inst

Properties


  "name"                     gchararray            : Read / Write

Description

The SoundFont instrument object is a container for IpatchSF2IZone objects.

Details

IpatchSF2Inst

typedef struct _IpatchSF2Inst IpatchSF2Inst;


IpatchSF2InstClass

typedef struct {
  IpatchContainerClass parent_class;
} IpatchSF2InstClass;


ipatch_sf2_inst_new ()

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).

ipatch_sf2_inst_get_zones()

#define             ipatch_sf2_inst_get_zones(inst)

inst :

ipatch_sf2_inst_first ()

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.

ipatch_sf2_inst_next ()

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.

ipatch_sf2_inst_new_zone ()

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

ipatch_sf2_inst_has_global_zone ()

gboolean            ipatch_sf2_inst_has_global_zone     (IpatchSF2Inst *inst);

Check if an instrument has a global zone (zone without a referenced sample).

inst : SoundFont instrument
Returns : TRUE if inst has a global zone, FALSE otherwise

ipatch_sf2_inst_set_name ()

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

ipatch_sf2_inst_get_name ()

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.

Property Details

The "name" property

  "name"                     gchararray            : Read / Write

Name of instrument

Default value: NULL

See Also

IpatchSF2Preset, IpatchSF2IZone