## IpatchSF2Inst IpatchSF2Inst — SoundFont instrument object |

## Stability Level

Stable, unless otherwise indicated

## Synopsis

                        IpatchSF2Inst;
    IpatchSF2Inst *     ipatch_sf2_inst_new                 (void);
    #define             ipatch_sf2_inst_get_zones           (inst)
    IpatchSF2Inst *     ipatch_sf2_inst_first               (IpatchIter *iter);
    IpatchSF2Inst *     ipatch_sf2_inst_next                (IpatchIter *iter);
    void                ipatch_sf2_inst_new_zone            (IpatchSF2Inst *inst,
                                                             IpatchSF2Sample *sample);
    void                ipatch_sf2_inst_set_name            (IpatchSF2Inst *inst,
                                                             const char *name);
    char *              ipatch_sf2_inst_get_name            (IpatchSF2Inst *inst);

## Object Hierarchy

      GObject
       +----IpatchItem
             +----IpatchContainer
                   +----IpatchSF2Inst

## Implemented Interfaces

IpatchSF2Inst implements IpatchSF2GenItemIface and IpatchSF2ModItemIface.

## Properties

      "attenuation"              gint                  : Read / Write
      "attenuation-set"          gboolean              : Read / Write
      "chorus"                   gint                  : Read / Write
      "chorus-set"               gboolean              : Read / Write
      "coarse-tune"              gint                  : Read / Write
      "coarse-tune-set"          gboolean              : Read / Write
      "exclusive-class"          gint                  : Read / Write
      "exclusive-class-set"      gboolean              : Read / Write
      "filter-cutoff"            gint                  : Read / Write
      "filter-cutoff-set"        gboolean              : Read / Write
      "filter-q"                 gint                  : Read / Write
      "filter-q-set"             gboolean              : Read / Write
      "fine-tune-override"       gint                  : Read / Write
      "fine-tune-override-set"   gboolean              : Read / Write
      "fixed-note"               gint                  : Read / Write
      "fixed-note-set"           gboolean              : Read / Write
      "fixed-velocity"           gint                  : Read / Write
      "fixed-velocity-set"       gboolean              : Read / Write
      "mod-env-attack"           gint                  : Read / Write
      "mod-env-attack-set"       gboolean              : Read / Write
      "mod-env-decay"            gint                  : Read / Write
      "mod-env-decay-set"        gboolean              : Read / Write
      "mod-env-delay"            gint                  : Read / Write
      "mod-env-delay-set"        gboolean              : Read / Write
      "mod-env-hold"             gint                  : Read / Write
      "mod-env-hold-set"         gboolean              : Read / Write
      "mod-env-release"          gint                  : Read / Write
      "mod-env-release-set"      gboolean              : Read / Write
      "mod-env-sustain"          gint                  : Read / Write
      "mod-env-sustain-set"      gboolean              : Read / Write
      "mod-env-to-filter-cutoff" gint                  : Read / Write
      "mod-env-to-filter-cutoff-set" gboolean              : Read / Write
      "mod-env-to-pitch"         gint                  : Read / Write
      "mod-env-to-pitch-set"     gboolean              : Read / Write
      "mod-lfo-delay"            gint                  : Read / Write
      "mod-lfo-delay-set"        gboolean              : Read / Write
      "mod-lfo-freq"             gint                  : Read / Write
      "mod-lfo-freq-set"         gboolean              : Read / Write
      "mod-lfo-to-filter-cutoff" gint                  : Read / Write
      "mod-lfo-to-filter-cutoff-set" gboolean              : Read / Write
      "mod-lfo-to-pitch"         gint                  : Read / Write
      "mod-lfo-to-pitch-set"     gboolean              : Read / Write
      "mod-lfo-to-volume"        gint                  : Read / Write
      "mod-lfo-to-volume-set"    gboolean              : Read / Write
      "name"                     gchar*                : Read / Write
      "note-range"               IpatchRange*          : Read / Write
      "note-range-set"           gboolean              : Read / Write
      "note-to-mod-env-decay"    gint                  : Read / Write
      "note-to-mod-env-decay-set" gboolean              : Read / Write
      "note-to-mod-env-hold"     gint                  : Read / Write
      "note-to-mod-env-hold-set" gboolean              : Read / Write
      "note-to-vol-env-decay"    gint                  : Read / Write
      "note-to-vol-env-decay-set" gboolean              : Read / Write
      "note-to-vol-env-hold"     gint                  : Read / Write
      "note-to-vol-env-hold-set" gboolean              : Read / Write
      "pan"                      gint                  : Read / Write
      "pan-set"                  gboolean              : Read / Write
      "reverb"                   gint                  : Read / Write
      "reverb-set"               gboolean              : Read / Write
      "root-note-override"       gint                  : Read / Write
      "root-note-override-set"   gboolean              : Read / Write
      "sample-coarse-end"        gint                  : Read / Write
      "sample-coarse-end-set"    gboolean              : Read / Write
      "sample-coarse-loop-end"   gint                  : Read / Write
      "sample-coarse-loop-end-set" gboolean              : Read / Write
      "sample-coarse-loop-start" gint                  : Read / Write
      "sample-coarse-loop-start-set" gboolean              : Read / Write
      "sample-coarse-start"      gint                  : Read / Write
      "sample-coarse-start-set"  gboolean              : Read / Write
      "sample-end"               gint                  : Read / Write
      "sample-end-set"           gboolean              : Read / Write
      "sample-loop-end"          gint                  : Read / Write
      "sample-loop-end-set"      gboolean              : Read / Write
      "sample-loop-start"        gint                  : Read / Write
      "sample-loop-start-set"    gboolean              : Read / Write
      "sample-start"             gint                  : Read / Write
      "sample-start-set"         gboolean              : Read / Write
      "scale-tune"               gint                  : Read / Write
      "scale-tune-set"           gboolean              : Read / Write
      "velocity-range"           IpatchRange*          : Read / Write
      "velocity-range-set"       gboolean              : Read / Write
      "vib-lfo-delay"            gint                  : Read / Write
      "vib-lfo-delay-set"        gboolean              : Read / Write
      "vib-lfo-freq"             gint                  : Read / Write
      "vib-lfo-freq-set"         gboolean              : Read / Write
      "vib-lfo-to-pitch"         gint                  : Read / Write
      "vib-lfo-to-pitch-set"     gboolean              : Read / Write
      "vol-env-attack"           gint                  : Read / Write
      "vol-env-attack-set"       gboolean              : Read / Write
      "vol-env-decay"            gint                  : Read / Write
      "vol-env-decay-set"        gboolean              : Read / Write
      "vol-env-delay"            gint                  : Read / Write
      "vol-env-delay-set"        gboolean              : Read / Write
      "vol-env-hold"             gint                  : Read / Write
      "vol-env-hold-set"         gboolean              : Read / Write
      "vol-env-release"          gint                  : Read / Write
      "vol-env-release-set"      gboolean              : Read / Write
      "vol-env-sustain"          gint                  : Read / Write
      "vol-env-sustain-set"      gboolean              : Read / Write

## Description

SoundFont instruments are children of IpatchSF2 objects and are referenced by IpatchSF2PZone objects.

## Details

### IpatchSF2Inst

    typedef struct _IpatchSF2Inst IpatchSF2Inst;

### ipatch_sf2_inst_new ()

    IpatchSF2Inst *     ipatch_sf2_inst_new                 (void);

Create a new SoundFont instrument object.

Returns : | New SoundFont 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_sf2_inst_get_zones()

    #define             ipatch_sf2_inst_get_zones(inst)

### ipatch_sf2_inst_first ()

    IpatchSF2Inst *     ipatch_sf2_inst_first               (IpatchIter *iter);

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

`iter` : | Patch item iterator containing IpatchSF2Inst items
Returns : | The first instrument in `iter` or `NULL` if empty.

### ipatch_sf2_inst_next ()

    IpatchSF2Inst *     ipatch_sf2_inst_next                (IpatchIter *iter);

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

`iter` : | Patch item iterator containing IpatchSF2Inst items
Returns : | The next instrument in `iter` or `NULL` if at the end of the list.

### ipatch_sf2_inst_new_zone ()

    void                ipatch_sf2_inst_new_zone            (IpatchSF2Inst *inst,
                                                             IpatchSF2Sample *sample);

A convenience function for quickly creating a new instrument zone, adding it to `inst` and setting the zone's referenced sample to `sample`.

`inst` : | SoundFont instrument
`sample` : | Referenced sample for new zone

### ipatch_sf2_inst_set_name ()

    void                ipatch_sf2_inst_set_name            (IpatchSF2Inst *inst,
                                                             const char *name);

Sets the name of a SoundFont instrument.

`inst` : | Instrument to set name of
`name` : | Value to set name to

### ipatch_sf2_inst_get_name ()

    char *              ipatch_sf2_inst_get_name            (IpatchSF2Inst *inst);

Gets the name of a SoundFont instrument.

`inst` : | Instrument to get name of
Returns : | Name of instrument or `NULL` if not set. String value should be freed when finished with it.

## Property Details

### The `"attenuation"` property

      "attenuation"              gint                  : Read / Write

Volume attenuation.

Allowed values: [0,1440]

Default value: 0

### The `"attenuation-set"` property

      "attenuation-set"          gboolean              : Read / Write

Default value: FALSE

### The `"chorus"` property

      "chorus"                   gint                  : Read / Write

Chorus.

Allowed values: [0,1000]

Default value: 0

### The `"chorus-set"` property

      "chorus-set"               gboolean              : Read / Write

Default value: FALSE

### The `"coarse-tune"` property

      "coarse-tune"              gint                  : Read / Write

Coarse Tune.

Allowed values: [-120,120]

Default value: 0

### The `"coarse-tune-set"` property

      "coarse-tune-set"          gboolean              : Read / Write

Default value: FALSE

### The `"exclusive-class"` property

      "exclusive-class"          gint                  : Read / Write

Exclusive Class.

Allowed values: [0,127]

Default value: 0

### The `"exclusive-class-set"` property

      "exclusive-class-set"      gboolean              : Read / Write

Default value: FALSE

### The `"filter-cutoff"` property

      "filter-cutoff"            gint                  : Read / Write

Low pass filter cutoff frequency.

Allowed values: [1500,13500]

Default value: 13500

### The `"filter-cutoff-set"` property

      "filter-cutoff-set"        gboolean              : Read / Write

Default value: FALSE

### The `"filter-q"` property

      "filter-q"                 gint                  : Read / Write

Low pass filter Q factor.

Allowed values: [0,960]

Default value: 0

### The `"filter-q-set"` property

      "filter-q-set"             gboolean              : Read / Write

Default value: FALSE

### The `"fine-tune-override"` property

      "fine-tune-override"       gint                  : Read / Write

Fine Tune.

Allowed values: [-99,99]

Default value: 0

### The `"fine-tune-override-set"` property

      "fine-tune-override-set"   gboolean              : Read / Write

Default value: FALSE

### The `"fixed-note"` property

      "fixed-note"               gint                  : Read / Write

Fixed Note.

Allowed values: [-1,127]

Default value: -1

### The `"fixed-note-set"` property

      "fixed-note-set"           gboolean              : Read / Write

Default value: FALSE

### The `"fixed-velocity"` property

      "fixed-velocity"           gint                  : Read / Write

Fixed Velocity.

Allowed values: [-1,127]

Default value: -1

### The `"fixed-velocity-set"` property

      "fixed-velocity-set"       gboolean              : Read / Write

Default value: FALSE

### The `"mod-env-attack"` property

      "mod-env-attack"           gint                  : Read / Write

Modulation envelope attack.

Allowed values: [-12000,8000]

Default value: -12000

### The `"mod-env-attack-set"` property

      "mod-env-attack-set"       gboolean              : Read / Write

Default value: FALSE

### The `"mod-env-decay"` property

      "mod-env-decay"            gint                  : Read / Write

Modulation envelope decay.

Allowed values: [-12000,8000]

Default value: -12000

### The `"mod-env-decay-set"` property

      "mod-env-decay-set"        gboolean              : Read / Write

Default value: FALSE

### The `"mod-env-delay"` property

      "mod-env-delay"            gint                  : Read / Write

Modulation envelope delay.

Allowed values: [-12000,5000]

Default value: -12000

### The `"mod-env-delay-set"` property

      "mod-env-delay-set"        gboolean              : Read / Write

Default value: FALSE

### The `"mod-env-hold"` property

      "mod-env-hold"             gint                  : Read / Write

Modulation envelope hold.

Allowed values: [-12000,5000]

Default value: -12000

### The `"mod-env-hold-set"` property

      "mod-env-hold-set"         gboolean              : Read / Write

Default value: FALSE

### The `"mod-env-release"` property

      "mod-env-release"          gint                  : Read / Write

Modulation envelope release.

Allowed values: [-12000,8000]

Default value: -12000

### The `"mod-env-release-set"` property

      "mod-env-release-set"      gboolean              : Read / Write

Default value: FALSE

### The `"mod-env-sustain"` property

      "mod-env-sustain"          gint                  : Read / Write

Modulation envelope sustain.

Allowed values: [0,1000]

Default value: 0

### The `"mod-env-sustain-set"` property

      "mod-env-sustain-set"      gboolean              : Read / Write

Default value: FALSE

### The `"mod-env-to-filter-cutoff"` property

      "mod-env-to-filter-cutoff" gint                  : Read / Write

Modulation envelope to filter cutoff.

Allowed values: [-12000,12000]

Default value: 0

### The `"mod-env-to-filter-cutoff-set"` property

      "mod-env-to-filter-cutoff-set" gboolean              : Read / Write

Default value: FALSE

### The `"mod-env-to-pitch"` property

      "mod-env-to-pitch"         gint                  : Read / Write

Modulation envelope to pitch.

Allowed values: [-12000,12000]

Default value: 0

### The `"mod-env-to-pitch-set"` property

      "mod-env-to-pitch-set"     gboolean              : Read / Write

Default value: FALSE

### The `"mod-lfo-delay"` property

      "mod-lfo-delay"            gint                  : Read / Write

Modulation oscillator delay.

Allowed values: [-12000,5000]

Default value: -12000

### The `"mod-lfo-delay-set"` property

      "mod-lfo-delay-set"        gboolean              : Read / Write

Default value: FALSE

### The `"mod-lfo-freq"` property

      "mod-lfo-freq"             gint                  : Read / Write

Modulation oscillator frequency.

Allowed values: [-16000,4500]

Default value: 0

### The `"mod-lfo-freq-set"` property

      "mod-lfo-freq-set"         gboolean              : Read / Write

Default value: FALSE

### The `"mod-lfo-to-filter-cutoff"` property

      "mod-lfo-to-filter-cutoff" gint                  : Read / Write

Modulation oscillator to filter cutoff.

Allowed values: [-12000,12000]

Default value: 0

### The `"mod-lfo-to-filter-cutoff-set"` property

      "mod-lfo-to-filter-cutoff-set" gboolean              : Read / Write

Default value: FALSE

### The `"mod-lfo-to-pitch"` property

      "mod-lfo-to-pitch"         gint                  : Read / Write

Modulation oscillator to pitch.

Allowed values: [-12000,12000]

Default value: 0

### The `"mod-lfo-to-pitch-set"` property

      "mod-lfo-to-pitch-set"     gboolean              : Read / Write

Default value: FALSE

### The `"mod-lfo-to-volume"` property

      "mod-lfo-to-volume"        gint                  : Read / Write

Modulation oscillator to volume.

Allowed values: [-960,960]

Default value: 0

### The `"mod-lfo-to-volume-set"` property

      "mod-lfo-to-volume-set"    gboolean              : Read / Write

Default value: FALSE

### The `"name"` property

      "name"                     gchar*                : Read / Write

Name.

Default value: NULL

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

      "note-range"               IpatchRange*          : Read / Write

Note Range.

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

      "note-range-set"           gboolean              : Read / Write

Default value: FALSE

### The `"note-to-mod-env-decay"` property

      "note-to-mod-env-decay"    gint                  : Read / Write

MIDI note to modulation envelope decay.

Allowed values: [-1200,1200]

Default value: 0

### The `"note-to-mod-env-decay-set"` property

      "note-to-mod-env-decay-set" gboolean              : Read / Write

Default value: FALSE

### The `"note-to-mod-env-hold"` property

      "note-to-mod-env-hold"     gint                  : Read / Write

MIDI note to modulation envelope hold.

Allowed values: [-1200,1200]

Default value: 0

### The `"note-to-mod-env-hold-set"` property

      "note-to-mod-env-hold-set" gboolean              : Read / Write

Default value: FALSE

### The `"note-to-vol-env-decay"` property

      "note-to-vol-env-decay"    gint                  : Read / Write

MIDI note to volume envelope decay.

Allowed values: [-1200,1200]

Default value: 0

### The `"note-to-vol-env-decay-set"` property

      "note-to-vol-env-decay-set" gboolean              : Read / Write

Default value: FALSE

### The `"note-to-vol-env-hold"` property

      "note-to-vol-env-hold"     gint                  : Read / Write

MIDI note to volume envelope hold.

Allowed values: [-1200,1200]

Default value: 0

### The `"note-to-vol-env-hold-set"` property

      "note-to-vol-env-hold-set" gboolean              : Read / Write

Default value: FALSE

### The `"pan"` property

      "pan"                      gint                  : Read / Write

Panning.

Allowed values: [-500,500]

Default value: 0

### The `"pan-set"` property

      "pan-set"                  gboolean              : Read / Write

Default value: FALSE

### The `"reverb"` property

      "reverb"                   gint                  : Read / Write

Reverb.

Allowed values: [0,1000]

Default value: 0

### The `"reverb-set"` property

      "reverb-set"               gboolean              : Read / Write

Default value: FALSE

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

      "root-note-override"       gint                  : Read / Write

Root Note.

Allowed values: [-1,127]

Default value: -1

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

      "root-note-override-set"   gboolean              : Read / Write

Default value: FALSE

### The `"sample-coarse-end"` property

      "sample-coarse-end"        gint                  : Read / Write

Sample End Coarse Ofs.

Allowed values: [-32768,0]

Default value: 0

### The `"sample-coarse-end-set"` property

      "sample-coarse-end-set"    gboolean              : Read / Write

Default value: FALSE

### The `"sample-coarse-loop-end"` property

      "sample-coarse-loop-end"   gint                  : Read / Write

Sample Loop End Coarse Ofs.

Allowed values: [-32768,32767]

Default value: 0

### The `"sample-coarse-loop-end-set"` property

      "sample-coarse-loop-end-set" gboolean              : Read / Write

Default value: FALSE

### The `"sample-coarse-loop-start"` property

      "sample-coarse-loop-start" gint                  : Read / Write

Sample Loop Start Coarse Ofs.

Allowed values: [-32768,32767]

Default value: 0

### The `"sample-coarse-loop-start-set"` property

      "sample-coarse-loop-start-set" gboolean              : Read / Write

Default value: FALSE

### The `"sample-coarse-start"` property

      "sample-coarse-start"      gint                  : Read / Write

Sample Start Coarse Ofs.

Allowed values: [0,32767]

Default value: 0

### The `"sample-coarse-start-set"` property

      "sample-coarse-start-set"  gboolean              : Read / Write

Default value: FALSE

### The `"sample-end"` property

      "sample-end"               gint                  : Read / Write

Sample End Ofs.

Allowed values: [0,1073741823]

Default value: 0

### The `"sample-end-set"` property

      "sample-end-set"           gboolean              : Read / Write

Default value: FALSE

### The `"sample-loop-end"` property

      "sample-loop-end"          gint                  : Read / Write

Sample Loop End Ofs.

Allowed values: [0,1073741823]

Default value: 0

### The `"sample-loop-end-set"` property

      "sample-loop-end-set"      gboolean              : Read / Write

Default value: FALSE

### The `"sample-loop-start"` property

      "sample-loop-start"        gint                  : Read / Write

Sample Loop Start Ofs.

Allowed values: [0,1073741823]

Default value: 0

### The `"sample-loop-start-set"` property

      "sample-loop-start-set"    gboolean              : Read / Write

Default value: FALSE

### The `"sample-start"` property

      "sample-start"             gint                  : Read / Write

Sample Start Ofs.

Allowed values: [0,1073741823]

Default value: 0

### The `"sample-start-set"` property

      "sample-start-set"         gboolean              : Read / Write

Default value: FALSE

### The `"scale-tune"` property

      "scale-tune"               gint                  : Read / Write

Scale Tune.

Allowed values: [0,1200]

Default value: 100

### The `"scale-tune-set"` property

      "scale-tune-set"           gboolean              : Read / Write

Default value: FALSE

### The `"velocity-range"` property

      "velocity-range"           IpatchRange*          : Read / Write

Velocity Range.

### The `"velocity-range-set"` property

      "velocity-range-set"       gboolean              : Read / Write

Default value: FALSE

### The `"vib-lfo-delay"` property

      "vib-lfo-delay"            gint                  : Read / Write

Vibrato oscillator delay.

Allowed values: [-12000,5000]

Default value: -12000

### The `"vib-lfo-delay-set"` property

      "vib-lfo-delay-set"        gboolean              : Read / Write

Default value: FALSE

### The `"vib-lfo-freq"` property

      "vib-lfo-freq"             gint                  : Read / Write

Vibrato oscillator frequency.

Allowed values: [-16000,4500]

Default value: 0

### The `"vib-lfo-freq-set"` property

      "vib-lfo-freq-set"         gboolean              : Read / Write

Default value: FALSE

### The `"vib-lfo-to-pitch"` property

      "vib-lfo-to-pitch"         gint                  : Read / Write

Vibrato oscillator to pitch.

Allowed values: [-12000,12000]

Default value: 0

### The `"vib-lfo-to-pitch-set"` property

      "vib-lfo-to-pitch-set"     gboolean              : Read / Write

Default value: FALSE

### The `"vol-env-attack"` property

      "vol-env-attack"           gint                  : Read / Write

Volume envelope attack.

Allowed values: [-12000,8000]

Default value: -12000

### The `"vol-env-attack-set"` property

      "vol-env-attack-set"       gboolean              : Read / Write

Default value: FALSE

### The `"vol-env-decay"` property

      "vol-env-decay"            gint                  : Read / Write

Volume envelope decay.

Allowed values: [-12000,8000]

Default value: -12000

### The `"vol-env-decay-set"` property

      "vol-env-decay-set"        gboolean              : Read / Write

Default value: FALSE

### The `"vol-env-delay"` property

      "vol-env-delay"            gint                  : Read / Write

Volume envelope delay.

Allowed values: [-12000,5000]

Default value: -12000

### The `"vol-env-delay-set"` property

      "vol-env-delay-set"        gboolean              : Read / Write

Default value: FALSE

### The `"vol-env-hold"` property

      "vol-env-hold"             gint                  : Read / Write

Volume envelope hold.

Allowed values: [-12000,5000]

Default value: -12000

### The `"vol-env-hold-set"` property

      "vol-env-hold-set"         gboolean              : Read / Write

Default value: FALSE

### The `"vol-env-release"` property

      "vol-env-release"          gint                  : Read / Write

Volume envelope release.

Allowed values: [-12000,8000]

Default value: -12000

### The `"vol-env-release-set"` property

      "vol-env-release-set"      gboolean              : Read / Write

Default value: FALSE

### The `"vol-env-sustain"` property

      "vol-env-sustain"          gint                  : Read / Write

Volume envelope sustain.

Allowed values: [0,1440]

Default value: 0

### The `"vol-env-sustain-set"` property

      "vol-env-sustain-set"      gboolean              : Read / Write

Default value: FALSE

## See Also

#IpatchSF2, IpatchSF2PZone