AgsIpatchSF2Reader

AgsIpatchSF2Reader — interfacing Soundfont2 related API of libinstpatch

Stability Level

Stable, unless otherwise indicated

Functions

Properties

AgsIpatch * ipatch Read / Write
AgsIpatch * ipatch Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── AgsIpatchSF2Reader

Includes

#include <ags/audio/file/ags_ipatch_sf2_reader.h>

Description

AgsIpatchSF2Reader is the base object to ineract with Soundfont2 related API.

Functions

AGS_IPATCH_SF2_READER_GET_OBJ_MUTEX()

#define AGS_IPATCH_SF2_READER_GET_OBJ_MUTEX(obj) (&(((AgsIpatchSF2Reader *) obj)->obj_mutex))

ags_ipatch_sf2_reader_load ()

gboolean
ags_ipatch_sf2_reader_load (AgsIpatchSF2Reader *ipatch_sf2_reader,
                            IpatchFileHandle *handle);

Load Soundfont2 file.

Parameters

ipatch_sf2_reader

the AgsSF2Reader

 

handle

the IpatchFileHandle

 

Returns

TRUE on success, else FALSE on failure

Since: 3.0.0


ags_ipatch_sf2_reader_select_preset ()

gboolean
ags_ipatch_sf2_reader_select_preset (AgsIpatchSF2Reader *ipatch_sf2_reader,
                                     guint preset_index);

Select preset.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

preset_index

the preset index

 

Returns

TRUE on success, else FALSE on failure

Since: 3.0.0


ags_ipatch_sf2_reader_select_instrument ()

gboolean
ags_ipatch_sf2_reader_select_instrument
                               (AgsIpatchSF2Reader *ipatch_sf2_reader,
                                guint instrument_index);

Select instrument.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

instrument_index

the instrument index

 

Returns

TRUE on success, else FALSE on failure

Since: 3.0.0


ags_ipatch_sf2_reader_select_sample ()

gboolean
ags_ipatch_sf2_reader_select_sample (AgsIpatchSF2Reader *ipatch_sf2_reader,
                                     guint sample_index);

Select sample.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

sample_index

the sample index

 

Returns

TRUE on success, else FALSE on failure

Since: 3.0.0


ags_ipatch_sf2_reader_get_preset_all ()

gchar **
ags_ipatch_sf2_reader_get_preset_all (AgsIpatchSF2Reader *ipatch_sf2_reader);

Get all preset names.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

Returns

the string vector cotaining preset names or NULL on failure.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_ipatch_sf2_reader_get_instrument_all ()

gchar **
ags_ipatch_sf2_reader_get_instrument_all
                               (AgsIpatchSF2Reader *ipatch_sf2_reader);

Get all instrument names.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

Returns

the string vector cotaining instrument names or NULL on failure.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_ipatch_sf2_reader_get_sample_all ()

gchar **
ags_ipatch_sf2_reader_get_sample_all (AgsIpatchSF2Reader *ipatch_sf2_reader);

Get all sample names.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

Returns

the string vector cotaining sample names or NULL on failure.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_ipatch_sf2_reader_get_instrument_by_preset_index ()

gchar **
ags_ipatch_sf2_reader_get_instrument_by_preset_index
                               (AgsIpatchSF2Reader *ipatch_sf2_reader,
                                guint preset_index);

Get instrument by preset index.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

preset_index

the preset index

 

Returns

the string vector cotaining instrument names or NULL on failure.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_ipatch_sf2_reader_get_sample_by_preset_index ()

gchar **
ags_ipatch_sf2_reader_get_sample_by_preset_index
                               (AgsIpatchSF2Reader *ipatch_sf2_reader,
                                guint preset_index);

Get sample by preset index.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

preset_index

the preset index

 

Returns

the string vector cotaining sample names or NULL on failure.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_ipatch_sf2_reader_get_sample_by_preset_and_instrument_index ()

gchar **
ags_ipatch_sf2_reader_get_sample_by_preset_and_instrument_index
                               (AgsIpatchSF2Reader *ipatch_sf2_reader,
                                guint preset_index,
                                guint instrument_index);

Get sample by preset and instrument index.

Parameters

ipatch_sf2_reader

the AgsIpatchSF2Reader

 

preset_index

the preset index

 

instrument_index

the instrument index

 

Returns

the string vector cotaining sample names or NULL on failure.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.0.0


ags_ipatch_sf2_reader_new ()

AgsIpatchSF2Reader *
ags_ipatch_sf2_reader_new (AgsIpatch *ipatch);

Creates a new instance of AgsIpatchSF2Reader.

Parameters

ipatch

the AgsIpatch

 

Returns

the new AgsIpatchSF2Reader.

Since: 3.0.0

Types and Values

enum AgsSF2Level

Enum values to describe the different levels of a Soundfont2 file.

Members

AGS_SF2_FILENAME

filename

 

AGS_SF2_PHDR

preset header

 

AGS_SF2_IHDR

instrument header

 

AGS_SF2_SHDR

sample header

 

Property Details

The “ipatch” property

  “ipatch”                   AgsIpatch *

The assigned AgsIpatch

Owner: AgsIpatchSF2Reader

Flags: Read / Write

Since: 3.0.0


The “ipatch” property

  “ipatch”                   AgsIpatch *

The assigned AgsIpatch

Owner: AgsIpatchSF2Reader

Flags: Read / Write

Since: 3.0.0