IpatchSF2ModItem

IpatchSF2ModItem — SoundFont modulator item interface

Stability Level

Stable, unless otherwise indicated

Functions

Properties

IpatchSF2ModList * modulators Read / Write

Object Hierarchy

    GInterface
    ╰── IpatchSF2ModItem

Description

An interface type which is used by IpatchSF2Preset, IpatchSF2Inst, IpatchSF2PZone and IpatchSF2IZone objects to add modulator realtime effect functionality.

Functions

ipatch_sf2_mod_item_get_mods ()

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.

Parameters

item

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.

[element-type Ipatch.SF2Mod][transfer full][nullable]


ipatch_sf2_mod_item_set_mods ()

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.

[skip]

Parameters

item

Item with modulators

 

mod_list

Modulator list to assign to zone.

[element-type Ipatch.SF2Mod]

flags

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.

[type IpatchSF2ModFlags]

ipatch_sf2_mod_item_set_mods_copy ()

void
ipatch_sf2_mod_item_set_mods_copy (IpatchSF2ModItem *item,
                                   GSList *mod_list);

Sets the modulator list of an item with modulators.

[rename-to ipatch_sf2_mod_item_set_mods]

Parameters

item

Item with modulators

 

mod_list

Modulator list to assign to zone.

[element-type Ipatch.SF2Mod][transfer none][nullable]

ipatch_sf2_mod_item_add ()

void
ipatch_sf2_mod_item_add (IpatchSF2ModItem *item,
                         const IpatchSF2Mod *mod);

ipatch_sf2_mod_item_insert ()

void
ipatch_sf2_mod_item_insert (IpatchSF2ModItem *item,
                            const IpatchSF2Mod *mod,
                            int pos);

Inserts a modulator into an item's modulator list. NOTE: Does not check for duplicates!

Parameters

item

Item with modulators

 

mod

Modulator to insert.

[transfer none]

pos

Index position in zone's modulator list to insert (0 = first, < 0 = last)

 

ipatch_sf2_mod_item_remove ()

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.

Parameters

item

Item with modulators

 

mod

Matching values of modulator to remove.

[transfer none]

ipatch_sf2_mod_item_change ()

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.

Parameters

item

Item with modulators

 

oldmod

Current values of modulator to set.

[transfer none]

newmod

New modulator values.

[transfer none]

ipatch_sf2_mod_item_count ()

guint
ipatch_sf2_mod_item_count (IpatchSF2ModItem *item);

Count number of modulators in an item with modulators.

Parameters

item

Item with modulators

 

Returns

Count of modulators

Property Details

The “modulators” property

  “modulators”               IpatchSF2ModList *

GSList of IpatchSF2Mod modulators.

[type GSList(Ipatch.SF2Mod)]

Owner: IpatchSF2ModItem

Flags: Read / Write