IpatchDLS2Inst

IpatchDLS2Inst — DLS instrument object

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * archive-location Read / Write
char * artist Read / Write
int bank Read / Write
char * comment Read / Write
char * commissioned Read / Write
char * copyright Read / Write
char * date Read / Write
char * engineer Read / Write
char * genre Read / Write
char * keywords Read / Write
char * medium Read / Write
char * name Read / Write
gboolean percussion Read / Write
char * product Read / Write
int program Read / Write
char * software Read / Write
char * source Read / Write
char * source-form Read / Write
char * subject Read / Write
char * technician Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── IpatchItem
        ╰── IpatchContainer
            ╰── IpatchDLS2Inst
                ╰── IpatchGigInst

Description

Defines a DLS instrument object. DLS instruments are the toplevel objects in the DLS instrument file tree hierarchy.

Functions

ipatch_dls2_inst_new ()

IpatchDLS2Inst *
ipatch_dls2_inst_new (void);

Create a new DLS instrument object.

Returns

New DLS instrument 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_dls2_inst_get_regions()

#define             ipatch_dls2_inst_get_regions(inst)

ipatch_dls2_inst_first ()

IpatchDLS2Inst *
ipatch_dls2_inst_first (IpatchIter *iter);

Gets the first item in an instrument iterator. A convenience wrapper for ipatch_iter_first().

[skip]

Parameters

iter

Patch item iterator containing IpatchDLS2Inst items

 

Returns

The first instrument in iter or NULL if empty.


ipatch_dls2_inst_next ()

IpatchDLS2Inst *
ipatch_dls2_inst_next (IpatchIter *iter);

Gets the next item in an instrument iterator. A convenience wrapper for ipatch_iter_next().

[skip]

Parameters

iter

Patch item iterator containing IpatchDLS2Inst items

 

Returns

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


ipatch_dls2_inst_get_info ()

char *
ipatch_dls2_inst_get_info (IpatchDLS2Inst *inst,
                           guint32 fourcc);

Get a DLS instrument info string by FOURCC integer ID (integer representation of a 4 character RIFF chunk ID, see IpatchRiff).

Parameters

inst

DLS instrument to get info from

 

fourcc

FOURCC integer id of INFO to get

 

Returns

New allocated info string value or NULL if no info with the given fourcc ID. String should be freed when finished with it.

[transfer full]


ipatch_dls2_inst_set_info ()

void
ipatch_dls2_inst_set_info (IpatchDLS2Inst *inst,
                           guint32 fourcc,
                           const char *val);

Sets an INFO value in a DLS instrument object. Emits changed signal.

Parameters

inst

DLS instrument to set info of

 

fourcc

FOURCC integer ID of INFO to set

 

val

Value to set info to or NULL to unset (clear) info.

[nullable]

ipatch_dls2_inst_set_midi_locale ()

void
ipatch_dls2_inst_set_midi_locale (IpatchDLS2Inst *inst,
                                  int bank,
                                  int program);

Sets the MIDI locale of a DLS instrument (bank and program numbers).

Parameters

inst

DLS instrument to set MIDI locale of

 

bank

MIDI bank number to assign to instrument

 

program

MIDI program number to assign to instrument

 

ipatch_dls2_inst_get_midi_locale ()

void
ipatch_dls2_inst_get_midi_locale (IpatchDLS2Inst *inst,
                                  int *bank,
                                  int *program);

Gets the MIDI locale of a DLS instrument (bank and program numbers).

Parameters

inst

Instrument to get MIDI locale from

 

bank

Location to store instrument's MIDI bank number or NULL.

[out][optional]

program

Location to store instrument's MIDI program number or NULL.

[out][optional]

ipatch_dls2_inst_compare ()

int
ipatch_dls2_inst_compare (const IpatchDLS2Inst *p1,
                          const IpatchDLS2Inst *p2);

Instrument comparison function for sorting. Compare two instruments by their MIDI bank:program numbers. Note that this function is compatible with GCompareFunc and can therefore be used with g_list_sort, etc.

FIXME: Also note that percussion instruments are sorted after regular ones.

Parameters

p1

First instrument in comparison

 

p2

Second instrument in comparison

 

Returns

Comparison result that is less than, equal to, or greater than zero if p1 is found, respectively, to be less than, to match, or be greater than p2 .


ipatch_dls2_inst_get_conns ()

GSList *
ipatch_dls2_inst_get_conns (IpatchDLS2Inst *inst);

Gets a list of connections from a DLS instrument. List should be freed with ipatch_dls2_conn_list_free() (free_conns set to TRUE) when finished with it.

Parameters

inst

Instrument to get connections from

 

Returns

New list of connections (IpatchDLS2Conn) in inst or NULL if no connections. Remember to free it when finished.

[element-type IpatchDLS2Conn][transfer full]


ipatch_dls2_inst_set_conn ()

void
ipatch_dls2_inst_set_conn (IpatchDLS2Inst *inst,
                           const IpatchDLS2Conn *conn);

Set a global DLS connection in an instrument. See ipatch_dls2_conn_list_set() for more details.

Parameters

inst

DLS instrument

 

conn

Connection

 

ipatch_dls2_inst_unset_conn ()

void
ipatch_dls2_inst_unset_conn (IpatchDLS2Inst *inst,
                             const IpatchDLS2Conn *conn);

Remove a global DLS connection from an instrument. See ipatch_dls2_conn_list_unset() for more details.

Parameters

inst

DLS instrument

 

conn

Connection

 

ipatch_dls2_inst_unset_all_conns ()

void
ipatch_dls2_inst_unset_all_conns (IpatchDLS2Inst *inst);

Remove all global connections in an instrument.

Parameters

inst

DLS instrument

 

ipatch_dls2_inst_conn_count ()

guint
ipatch_dls2_inst_conn_count (IpatchDLS2Inst *inst);

Count number of connections in a instrument

Parameters

inst

Instrument to count connections in

 

Returns

Count of connections

Types and Values

IPATCH_DLS2_INST_BANK_MAX

#define IPATCH_DLS2_INST_BANK_MAX  0x3FFF

enum IpatchDLS2InstFlags

Members

IPATCH_DLS2_INST_PERCUSSION

Set if percussion instrument

 

IPATCH_DLS2_INST_UNUSED_FLAG_SHIFT

#define             IPATCH_DLS2_INST_UNUSED_FLAG_SHIFT

Property Details

The “archive-location” property

  “archive-location”         char *

Location where subject is archived.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “artist” property

  “artist”                   char *

Original artist.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “bank” property

  “bank”                     int

MIDI bank number.

Owner: IpatchDLS2Inst

Flags: Read / Write

Allowed values: [0,16383]

Default value: 0


The “comment” property

  “comment”                  char *

Comments.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “commissioned” property

  “commissioned”             char *

Who commissioned the material.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “copyright” property

  “copyright”                char *

Copyright.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “date” property

  “date”                     char *

Creation date (YYYY-MM-DD).

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “engineer” property

  “engineer”                 char *

Engineers separated by "; ".

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “genre” property

  “genre”                    char *

Genre.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “keywords” property

  “keywords”                 char *

Keywords (separated by "; ").

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “medium” property

  “medium”                   char *

Original medium of the material (record, CD, etc).

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “name” property

  “name”                     char *

Name.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: "untitled"


The “percussion” property

  “percussion”               gboolean

Percussion instrument?.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: FALSE


The “product” property

  “product”                  char *

Product intended for.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “program” property

  “program”                  int

MIDI program number.

Owner: IpatchDLS2Inst

Flags: Read / Write

Allowed values: [0,127]

Default value: 0


The “software” property

  “software”                 char *

Editor software used.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “source” property

  “source”                   char *

Source of the original material.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “source-form” property

  “source-form”              char *

Original source that was digitized.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “subject” property

  “subject”                  char *

Subject of the material.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL


The “technician” property

  “technician”               char *

Technician who sampled the material.

Owner: IpatchDLS2Inst

Flags: Read / Write

Default value: NULL