IpatchSF2Preset

IpatchSF2Preset — SoundFont preset object

Stability Level

Stable, unless otherwise indicated

Synopsis

                    IpatchSF2Preset;
IpatchSF2Preset *   ipatch_sf2_preset_new               (void);
#define             ipatch_sf2_preset_get_zones         (preset)
IpatchSF2Preset *   ipatch_sf2_preset_first             (IpatchIter *iter);
IpatchSF2Preset *   ipatch_sf2_preset_next              (IpatchIter *iter);
void                ipatch_sf2_preset_new_zone          (IpatchSF2Preset *preset,
                                                         IpatchSF2Inst *inst);
void                ipatch_sf2_preset_set_name          (IpatchSF2Preset *preset,
                                                         const char *name);
char *              ipatch_sf2_preset_get_name          (IpatchSF2Preset *preset);
void                ipatch_sf2_preset_set_midi_locale   (IpatchSF2Preset *preset,
                                                         int bank,
                                                         int program);
void                ipatch_sf2_preset_get_midi_locale   (IpatchSF2Preset *preset,
                                                         int *bank,
                                                         int *program);
int                 ipatch_sf2_preset_compare           (const IpatchSF2Preset *p1,
                                                         const IpatchSF2Preset *p2);

Object Hierarchy

  GObject
   +----IpatchItem
         +----IpatchContainer
               +----IpatchSF2Preset

Implemented Interfaces

IpatchSF2Preset implements IpatchSF2GenItemIface and IpatchSF2ModItemIface.

Properties

  "attenuation"              gint                  : Read / Write
  "attenuation-set"          gboolean              : Read / Write
  "bank"                     gint                  : Read / Write
  "chorus"                   gint                  : Read / Write
  "chorus-set"               gboolean              : Read / Write
  "coarse-tune"              gint                  : Read / Write
  "coarse-tune-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
  "genre"                    guint                 : Read / Write
  "library"                  guint                 : 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
  "morphology"               guint                 : 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
  "percussion"               gboolean              : Read / Write
  "program"                  gint                  : Read / Write
  "reverb"                   gint                  : Read / Write
  "reverb-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 presets are children of IpatchSF2 objects and define individual instruments mapped to MIDI bank/program numbers.

Details

IpatchSF2Preset

typedef struct _IpatchSF2Preset IpatchSF2Preset;

ipatch_sf2_preset_new ()

IpatchSF2Preset *   ipatch_sf2_preset_new               (void);

Create a new SoundFont preset object.

Returns :

New SoundFont preset 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_preset_get_zones()

#define             ipatch_sf2_preset_get_zones(preset)

ipatch_sf2_preset_first ()

IpatchSF2Preset *   ipatch_sf2_preset_first             (IpatchIter *iter);

Gets the first item in a preset iterator. A convenience wrapper for ipatch_iter_first().

iter :

Patch item iterator containing IpatchSF2Preset items

Returns :

The first preset in iter or NULL if empty.

ipatch_sf2_preset_next ()

IpatchSF2Preset *   ipatch_sf2_preset_next              (IpatchIter *iter);

Gets the next item in a preset iterator. A convenience wrapper for ipatch_iter_next().

iter :

Patch item iterator containing IpatchSF2Preset items

Returns :

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

ipatch_sf2_preset_new_zone ()

void                ipatch_sf2_preset_new_zone          (IpatchSF2Preset *preset,
                                                         IpatchSF2Inst *inst);

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

preset :

SoundFont preset

inst :

Referenced instrument for new zone

ipatch_sf2_preset_set_name ()

void                ipatch_sf2_preset_set_name          (IpatchSF2Preset *preset,
                                                         const char *name);

Sets the name of a SoundFont preset.

preset :

Preset to set name of

name :

Value to set name to

ipatch_sf2_preset_get_name ()

char *              ipatch_sf2_preset_get_name          (IpatchSF2Preset *preset);

Gets the name of a SoundFont preset.

preset :

Preset to get name of

Returns :

Name of preset or NULL if not set. String value should be freed when finished with it.

ipatch_sf2_preset_set_midi_locale ()

void                ipatch_sf2_preset_set_midi_locale   (IpatchSF2Preset *preset,
                                                         int bank,
                                                         int program);

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

preset :

Preset to set MIDI locale of

bank :

MIDI bank number to assign to preset

program :

MIDI program number to assign to preset

ipatch_sf2_preset_get_midi_locale ()

void                ipatch_sf2_preset_get_midi_locale   (IpatchSF2Preset *preset,
                                                         int *bank,
                                                         int *program);

Gets the MIDI locale of a SoundFont preset (bank and program numbers).

preset :

Preset to get MIDI locale from

bank :

Location to store preset's MIDI bank number or NULL

program :

Location to store preset's MIDI program number or NULL

ipatch_sf2_preset_compare ()

int                 ipatch_sf2_preset_compare           (const IpatchSF2Preset *p1,
                                                         const IpatchSF2Preset *p2);

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

p1 :

First preset in comparison

p2 :

Second preset 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.

Property Details

The "attenuation" property

  "attenuation"              gint                  : Read / Write

Volume attenuation.

Allowed values: [-1440,1440]

Default value: 0


The "attenuation-set" property

  "attenuation-set"          gboolean              : Read / Write

Default value: FALSE


The "bank" property

  "bank"                     gint                  : Read / Write

MIDI bank number.

Allowed values: [0,128]

Default value: 0


The "chorus" property

  "chorus"                   gint                  : Read / Write

Chorus.

Allowed values: [-1000,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: [-240,240]

Default value: 0


The "coarse-tune-set" property

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

Default value: FALSE


The "filter-cutoff" property

  "filter-cutoff"            gint                  : Read / Write

Low pass filter cutoff frequency.

Allowed values: [-12000,12000]

Default value: 0


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: [-960,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: [-198,198]

Default value: 0


The "fine-tune-override-set" property

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

Default value: FALSE


The "genre" property

  "genre"                    guint                 : Read / Write

Genre category.

Default value: 0


The "library" property

  "library"                  guint                 : Read / Write

Library category.

Default value: 0


The "mod-env-attack" property

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

Modulation envelope attack.

Allowed values: [-20000,20000]

Default value: 0


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: [-20000,20000]

Default value: 0


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: [-17000,17000]

Default value: 0


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: [-17000,17000]

Default value: 0


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: [-20000,20000]

Default value: 0


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: [-1000,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: [-24000,24000]

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: [-24000,24000]

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: [-17000,17000]

Default value: 0


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: [-20500,20500]

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: [-24000,24000]

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: [-24000,24000]

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: [-1920,1920]

Default value: 0


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

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

Default value: FALSE


The "morphology" property

  "morphology"               guint                 : Read / Write

Morphology category.

Default value: 0


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: [-2400,2400]

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: [-2400,2400]

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: [-2400,2400]

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: [-2400,2400]

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: [-1000,1000]

Default value: 0


The "pan-set" property

  "pan-set"                  gboolean              : Read / Write

Default value: FALSE


The "percussion" property

  "percussion"               gboolean              : Read / Write

Percussion preset?.

Default value: FALSE


The "program" property

  "program"                  gint                  : Read / Write

MIDI program number.

Allowed values: [0,127]

Default value: 0


The "reverb" property

  "reverb"                   gint                  : Read / Write

Reverb.

Allowed values: [-1000,1000]

Default value: 0


The "reverb-set" property

  "reverb-set"               gboolean              : Read / Write

Default value: FALSE


The "scale-tune" property

  "scale-tune"               gint                  : Read / Write

Scale Tune.

Allowed values: [-1200,1200]

Default value: 0


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: [-17000,17000]

Default value: 0


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: [-20500,20500]

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: [-24000,24000]

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: [-20000,20000]

Default value: 0


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: [-20000,20000]

Default value: 0


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: [-17000,17000]

Default value: 0


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: [-17000,17000]

Default value: 0


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: [-20000,20000]

Default value: 0


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: [-1440,1440]

Default value: 0


The "vol-env-sustain-set" property

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

Default value: FALSE

See Also

IpatchSF2