IpatchVBank

IpatchVBank — Virtual bank object

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * author Read / Write
char * comment Read / Write
char * date Read / Write
char * engine Read / Write
char * name Read / Write
char * parser-version Read / Write
char * require-version Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── IpatchItem
        ╰── IpatchContainer
            ╰── IpatchBase
                ╰── IpatchVBank

Description

Virtual banks provide the capability of creating new instrument MIDI maps from components from other files of possibly different types.

Functions

ipatch_vbank_new ()

IpatchVBank *
ipatch_vbank_new (void);

Create a new virtual bank base object.

Returns

New IVBank base object with a reference count of 1. Caller owns the reference and removing it will destroy the item.


ipatch_vbank_get_insts()

#define             ipatch_vbank_get_insts(vbank)

ipatch_vbank_find_inst ()

IpatchVBankInst *
ipatch_vbank_find_inst (IpatchVBank *vbank,
                        const char *name,
                        int bank,
                        int program,
                        const IpatchVBankInst *exclude);

Find an instrument by name or bank:preset MIDI numbers. If instrument name and bank :program are specified then match for either condition. If an instrument is found its reference count is incremented before it is returned. The caller is responsible for removing the reference with g_object_unref() when finished with it.

Parameters

vbank

VBank to search in

 

name

Name of instrument to find or NULL to match any name.

[nullable]

bank

MIDI bank number of instrument to search for or -1 to not search by MIDI bank:program numbers

 

program

MIDI program number of instrument to search for, only used if bank is 0-128

 

exclude

An instrument to exclude from the search or NULL.

[nullable]

Returns

The matching instrument or NULL if not found. Remember to unref the item when finished with it.

[transfer full]


ipatch_vbank_make_unique_name ()

char *
ipatch_vbank_make_unique_name (IpatchVBank *vbank,
                               const char *name,
                               const IpatchVBankInst *exclude);

Generates a unique instrument name for vbank . The name parameter is used as a base and is modified, by appending a number, to make it unique (if necessary). The exclude parameter is used to exclude an existing vbank instrument from the search.

MT-Note: To ensure that an item is actually unique before being added to a VBank object, ipatch_container_add_unique() should be used.

Parameters

vbank

VBank item

 

name

An initial name to use or NULL.

[nullable]

exclude

An item to exclude from search or NULL.

[nullable]

Returns

A new unique name which should be freed when finished with it.

Types and Values

IPATCH_VBANK_INFO_COUNT

#define IPATCH_VBANK_INFO_COUNT		7

Count of info strings

Property Details

The “author” property

  “author”                   char *

Author of file.

Owner: IpatchVBank

Flags: Read / Write

Default value: NULL


The “comment” property

  “comment”                  char *

Comments.

Owner: IpatchVBank

Flags: Read / Write

Default value: NULL


The “date” property

  “date”                     char *

Creation date.

Owner: IpatchVBank

Flags: Read / Write

Default value: NULL


The “engine” property

  “engine”                   char *

Synthesis engine.

Owner: IpatchVBank

Flags: Read / Write

Default value: NULL


The “name” property

  “name”                     char *

Descriptive name.

Owner: IpatchVBank

Flags: Read / Write

Default value: NULL


The “parser-version” property

  “parser-version”           char *

Parser version.

Owner: IpatchVBank

Flags: Read / Write

Default value: "1.0"


The “require-version” property

  “require-version”          char *

Required parser version.

Owner: IpatchVBank

Flags: Read / Write

Default value: "1.0"