IpatchSF2Zone

IpatchSF2Zone — Abstract base class for SoundFont zones

Stability Level

Stable, unless otherwise indicated

Synopsis

                    IpatchSF2Zone;
#define             IPATCH_SF2_ZONE_UNUSED_FLAG_SHIFT
#define             IPATCH_SF2_ZONE_GEN_AMT             (zone,
                                                         genid)
#define             IPATCH_SF2_ZONE_GEN_TEST_FLAG       (zone,
                                                         genid)
#define             IPATCH_SF2_ZONE_GEN_SET_FLAG        (zone,
                                                         genid)
#define             IPATCH_SF2_ZONE_GEN_CLEAR_FLAG      (zone,
                                                         genid)
IpatchSF2Zone *     ipatch_sf2_zone_first               (IpatchIter *iter);
IpatchSF2Zone *     ipatch_sf2_zone_next                (IpatchIter *iter);
void                ipatch_sf2_zone_set_link_item       (IpatchSF2Zone *zone,
                                                         IpatchItem *item);
gboolean            ipatch_sf2_zone_set_link_item_no_notify
                                                        (IpatchSF2Zone *zone,
                                                         IpatchItem *item,
                                                         IpatchItem **olditem);
IpatchItem *        ipatch_sf2_zone_get_link_item       (IpatchSF2Zone *zone);
IpatchItem *        ipatch_sf2_zone_peek_link_item      (IpatchSF2Zone *zone);

Object Hierarchy

  GObject
   +----IpatchItem
         +----IpatchSF2Zone
               +----IpatchSF2IZone
               +----IpatchSF2PZone

Implemented Interfaces

IpatchSF2Zone implements IpatchSF2ModItemIface.

Description

Zones are children of IpatchSF2Preset and IpatchSF2Inst and define synthesis parameters and a linked item (IpatchSF2Inst in the case of IpatchSF2PZone and IpatchSF2Sample in the case of IpatchSF2IZone).

Details

IpatchSF2Zone

typedef struct _IpatchSF2Zone IpatchSF2Zone;

IPATCH_SF2_ZONE_UNUSED_FLAG_SHIFT

#define IPATCH_SF2_ZONE_UNUSED_FLAG_SHIFT  (IPATCH_ITEM_UNUSED_FLAG_SHIFT + 2)

IPATCH_SF2_ZONE_GEN_AMT()

#define             IPATCH_SF2_ZONE_GEN_AMT(zone, genid)

IPATCH_SF2_ZONE_GEN_TEST_FLAG()

#define             IPATCH_SF2_ZONE_GEN_TEST_FLAG(zone, genid)

IPATCH_SF2_ZONE_GEN_SET_FLAG()

#define             IPATCH_SF2_ZONE_GEN_SET_FLAG(zone, genid)

IPATCH_SF2_ZONE_GEN_CLEAR_FLAG()

#define             IPATCH_SF2_ZONE_GEN_CLEAR_FLAG(zone, genid)

ipatch_sf2_zone_first ()

IpatchSF2Zone *     ipatch_sf2_zone_first               (IpatchIter *iter);

Gets the first item in a zone iterator. A convenience wrapper for ipatch_iter_first().

iter :

Patch item iterator containing IpatchSF2Zone items

Returns :

The first zone in iter or NULL if empty.

ipatch_sf2_zone_next ()

IpatchSF2Zone *     ipatch_sf2_zone_next                (IpatchIter *iter);

Gets the next item in a zone iterator. A convenience wrapper for ipatch_iter_next().

iter :

Patch item iterator containing IpatchSF2Zone items

Returns :

The next zone in iter or NULL if at the end of the list.

ipatch_sf2_zone_set_link_item ()

void                ipatch_sf2_zone_set_link_item       (IpatchSF2Zone *zone,
                                                         IpatchItem *item);

Sets the referenced item of a zone (a IpatchSF2Inst for preset zones, IpatchSF2Sample for instrument zones). The type specific item set routines for each zone type may be preferred, as this one doesn't do strict type checking.

zone :

Zone to set zone item of

item :

New item for zone to use

ipatch_sf2_zone_set_link_item_no_notify ()

gboolean            ipatch_sf2_zone_set_link_item_no_notify
                                                        (IpatchSF2Zone *zone,
                                                         IpatchItem *item,
                                                         IpatchItem **olditem);

Like ipatch_sf2_zone_set_link_item() but performs no property or item change notifications (shouldn't normally be used outside of derived types), and the old value can be retrieved with the olditem parameter.

zone :

Zone to set zone item of

item :

New item for zone to use

olditem :

Pointer to store old item pointer or NULL to ignore. Caller owns reference if specified.

Returns :

TRUE if property was changed, FALSE otherwise (invalid inputs)

ipatch_sf2_zone_get_link_item ()

IpatchItem *        ipatch_sf2_zone_get_link_item       (IpatchSF2Zone *zone);

Gets the referenced item from a zone (a IpatchSF2Inst for preset zones, IpatchSF2Sample for instrument zones). The type specific item set routines for each zone type may be preferred, as this one doesn't do strict type checking. The returned item's reference count is incremented and the caller is responsible for unrefing it with g_object_unref().

zone :

Zone to get referenced item of

Returns :

Zone's referenced item or NULL if global zone. Remember to unreference the item with g_object_unref() when done with it.

ipatch_sf2_zone_peek_link_item ()

IpatchItem *        ipatch_sf2_zone_peek_link_item      (IpatchSF2Zone *zone);

Like ipatch_sf2_zone_get_link_item() but does not add a reference to the returned item. This function should only be used if a reference of the returned item is ensured or only the pointer value is of interest.

zone :

Zone to get referenced item of

Returns :

Zone's linked item. Remember that the item has NOT been referenced.