libinstpatch Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties |
typedef IpatchSF2ModItem; IpatchSF2ModItemIface; #define ipatch_sf2_mod_item_add (item, mod) GSList * ipatch_sf2_mod_item_get_mods (IpatchSF2ModItem *item
); void ipatch_sf2_mod_item_set_mods (IpatchSF2ModItem *item
,GSList *mod_list
,int flags
); void ipatch_sf2_mod_item_insert (IpatchSF2ModItem *item
,const IpatchSF2Mod *mod
,int pos
); void ipatch_sf2_mod_item_remove (IpatchSF2ModItem *item
,const IpatchSF2Mod *mod
); void ipatch_sf2_mod_item_change (IpatchSF2ModItem *item
,const IpatchSF2Mod *oldmod
,const IpatchSF2Mod *newmod
); guint ipatch_sf2_mod_item_count (IpatchSF2ModItem *item
);
IpatchSF2ModItemIface is implemented by IpatchSF2IZone, IpatchSF2Inst, IpatchSF2PZone, IpatchSF2Preset and IpatchSF2Zone.
An interface type which is used by IpatchSF2Preset, IpatchSF2Inst, IpatchSF2PZone and IpatchSF2IZone objects to add modulator realtime effect functionality.
GSList * ipatch_sf2_mod_item_get_mods (IpatchSF2ModItem *item
);
Gets a list of modulators from an item with modulators. List should be freed
with ipatch_sf2_mod_list_free()
(free_mods set to TRUE
) when finished
with it.
|
Item with modulators |
Returns : |
New list of modulators (IpatchSF2Mod) in item or NULL if no
modulators. Remember to free it with ipatch_sf2_mod_list_free() when finished.
|
void ipatch_sf2_mod_item_set_mods (IpatchSF2ModItem *item
,GSList *mod_list
,int flags
);
Sets the complete modulator list of an item with modulators.
If IPATCH_SF2_MOD_NO_NOTIFY is not in flags
then IpatchItem property
notify is done.
|
Item with modulators |
|
Modulator list to assign to zone. |
|
Flags for controlling list duplication and item property
notification (IpatchSF2ModFlags). If IPATCH_SF2_MOD_NO_DUPLICATE
is set then ownership of mod_list is taken over (not duplicated).
If IPATCH_SF2_MOD_NO_NOTIFY is set, then item property notify will not
be done.
|
void ipatch_sf2_mod_item_insert (IpatchSF2ModItem *item
,const IpatchSF2Mod *mod
,int pos
);
Inserts a modulator into an item's modulator list. Does not check for
duplicates! The modulator is not used directly, a new one is created and
the values in mod
are copied to it.
An IpatchItem property notify is done.
|
Item with modulators |
|
Modulator to insert (a new modulator is created and the values are copied to it) |
|
Index position in zone's modulator list to insert (0 = first, < 0 = last) |
void ipatch_sf2_mod_item_remove (IpatchSF2ModItem *item
,const IpatchSF2Mod *mod
);
Remove a modulator from an item with modulators. The modulator values in mod
are used to search the modulator list. The first modulator
that matches all fields in mod
is removed.
An IpatchItem property notify is done.
|
Item with modulators |
|
Matching values of modulator to remove |
void ipatch_sf2_mod_item_change (IpatchSF2ModItem *item
,const IpatchSF2Mod *oldmod
,const IpatchSF2Mod *newmod
);
Sets the values of an existing modulator in an item with modulators. The
modulator list in item is searched for a modulator that matches the values in
oldmod
. If a modulator is found its values are set to those in newmod
.
If it is not found, nothing is done.
If change occurs IpatchItem property notify is done.
|
Item with modulators |
|
Current values of modulator to set |
|
New modulator values |
guint ipatch_sf2_mod_item_count (IpatchSF2ModItem *item
);
Count number of modulators in an item with modulators.
|
Item with modulators |
Returns : |
Count of modulators |