## IpatchVBankRegion

IpatchVBankRegion — Virtual bank instrument region

## Stability Level

Stable, unless otherwise indicated

## Synopsis

                        IpatchVBankRegion;
    enum                IpatchVBankRegionNoteRangeMode;
    enum                IpatchVBankRegionRootNoteMode;
    IpatchVBankRegion * ipatch_vbank_region_new             (void);
    IpatchVBankRegion * ipatch_vbank_region_first           (IpatchIter *iter);
    IpatchVBankRegion * ipatch_vbank_region_next            (IpatchIter *iter);
    void                ipatch_vbank_region_set_id_props    (IpatchVBankRegion *region,
                                                             char **id_props);
    char **             ipatch_vbank_region_get_id_props    (IpatchVBankRegion *region,
                                                             guint *n_elements);

## Object Hierarchy

      GObject
       +----IpatchItem
             +----IpatchVBankRegion

## Properties

      "file-index"               guint                 : Read
      "id-props"                 GValueArray*          : Read / Write
      "link-item"                IpatchItem*           : Read / Write
      "note-range"               IpatchRange*          : Read / Write
      "note-range-mode"          IpatchVBankRegionNoteRangeMode  : Read / Write
      "root-note"                gint                  : Read / Write
      "root-note-mode"           IpatchVBankRegionRootNoteMode  : Read / Write

## Description

Virtual bank regions are children to IpatchVBankInst objects and reference synthesizable IpatchItem objects from other files. This object forms the bases for constructing new instruments from one or more items in other instrument bank files.

## Details

### IpatchVBankRegion

    typedef struct _IpatchVBankRegion IpatchVBankRegion;

### enum IpatchVBankRegionNoteRangeMode

    typedef enum
    {
      IPATCH_VBANK_REGION_NOTE_RANGE_MODE_INTERSECT	= 0,
      IPATCH_VBANK_REGION_NOTE_RANGE_MODE_OVERRIDE	= 1
    } IpatchVBankRegionNoteRangeMode;

### enum IpatchVBankRegionRootNoteMode

    typedef enum
    {
      IPATCH_VBANK_REGION_ROOT_NOTE_MODE_OFFSET	= 0,
      IPATCH_VBANK_REGION_ROOT_NOTE_MODE_OVERRIDE	= 1
    } IpatchVBankRegionRootNoteMode;

### ipatch_vbank_region_new ()

    IpatchVBankRegion * ipatch_vbank_region_new             (void);

Create a new virtual bank region object.

Returns : | New virtual bank region 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_vbank_region_first ()

    IpatchVBankRegion * ipatch_vbank_region_first           (IpatchIter *iter);

Gets the first item in a virtual bank region iterator. A convenience wrapper for `ipatch_iter_first()`.

`iter` : | Patch item iterator containing IpatchVBankRegion items
Returns : | The first virtual bank region in `iter` or `NULL` if empty.

### ipatch_vbank_region_next ()

    IpatchVBankRegion * ipatch_vbank_region_next            (IpatchIter *iter);

Gets the next item in a virtual bank region iterator. A convenience wrapper for `ipatch_iter_next()`.

`iter` : | Patch item iterator containing IpatchVBankRegion items
Returns : | The next virtual bank region in `iter` or `NULL` if at the end of the list.

### ipatch_vbank_region_set_id_props ()

    void                ipatch_vbank_region_set_id_props    (IpatchVBankRegion *region,
                                                             char **id_props);

Set the ID properties of a virtual bank region. These are used to uniquely identify an item in an external instrument file. This function is likely only used by the VBank loader before an item is resolved. Normal users will likely just assign to the "item-link" parameter.

`region` : | VBank region
`id_props` : | NULL terminated array of name/value string pairs

### ipatch_vbank_region_get_id_props ()

    char **             ipatch_vbank_region_get_id_props    (IpatchVBankRegion *region,
                                                             guint *n_elements);

Get ID properties which uniquely identify the referenced item. These are usually only available until the item gets resolved, at which point "item-link" is set.

`region` : | VBank region
`n_elements` : | Pointer to store count of elements in returned string array or `NULL` to ignore.
Returns : | `NULL` terminated array of name/value pair property strings or `NULL` if none. Free with `g_strfreev()` when finished using it.

## Property Details

### The `"file-index"` property

      "file-index"               guint                 : Read

File index.

Default value: 0

### The `"id-props"` property

      "id-props"                 GValueArray*          : Read / Write

Identification properties.

### The `"link-item"` property

      "link-item"                IpatchItem*           : Read / Write

Link item.

### The `"note-range"` property

      "note-range"               IpatchRange*          : Read / Write

Note range.

### The `"note-range-mode"` property

      "note-range-mode"          IpatchVBankRegionNoteRangeMode  : Read / Write

Note range mode.

Default value: IPATCH_VBANK_REGION_NOTE_RANGE_MODE_INTERSECT

### The `"root-note"` property

      "root-note"                gint                  : Read / Write

Root note.

Allowed values: [-127,127]

Default value: 0

### The `"root-note-mode"` property

      "root-note-mode"           IpatchVBankRegionRootNoteMode  : Read / Write

Root note mode.

Default value: IPATCH_VBANK_REGION_ROOT_NOTE_MODE_OFFSET

## See Also

#IpatchVBankInst, IpatchVBank