Top | ![]() |
![]() |
![]() |
![]() |
IpatchSF2 * | ipatch_sf2_new () |
#define | ipatch_sf2_get_presets() |
#define | ipatch_sf2_get_insts() |
#define | ipatch_sf2_get_samples() |
void | ipatch_sf2_set_file () |
IpatchSF2File * | ipatch_sf2_get_file () |
char * | ipatch_sf2_get_info () |
void | ipatch_sf2_set_info () |
IpatchSF2Info * | ipatch_sf2_get_info_array () |
void | ipatch_sf2_free_info_array () |
gboolean | ipatch_sf2_info_id_is_valid () |
int | ipatch_sf2_get_info_max_size () |
IpatchSF2Preset * | ipatch_sf2_find_preset () |
IpatchSF2Inst * | ipatch_sf2_find_inst () |
IpatchSF2Sample * | ipatch_sf2_find_sample () |
IpatchList * | ipatch_sf2_get_zone_references () |
char * | ipatch_sf2_make_unique_name () |
char * | author | Read / Write |
char * | comment | Read / Write |
char * | copyright | Read / Write |
char * | date | Read / Write |
char * | engine | Read / Write |
char * | name | Read / Write |
char * | product | Read / Write |
char * | rom-name | Read / Write |
char * | rom-version | Read / Write |
gboolean | samples-24bit | Read / Write |
char * | software | Read / Write |
char * | version | Read / Write |
enum | IpatchSF2Flags |
#define | IPATCH_SF2_UNUSED_FLAG_SHIFT |
enum | IpatchSF2InfoType |
#define | IPATCH_SF2_INFO_COUNT |
#define | IPATCH_SF2_DEFAULT_ENGINE |
SoundFont version 2 instrument file object. Parent to IpatchSF2Preset, IpatchSF2Inst and IpatchSF2Sample objects.
void ipatch_sf2_set_file (IpatchSF2 *sf
,IpatchSF2File *file
);
Sets the file object of a SoundFont. SoundFont files are kept open
for sample data that references the file. This function sets a
SoundFonts authoritive file object. A convenience function, as
ipatch_base_set_file()
does the same thing (albeit without more specific
type casting).
IpatchSF2File *
ipatch_sf2_get_file (IpatchSF2 *sf
);
Gets the file object of a SoundFont. The returned SoundFont file object's
reference count has incremented. The caller owns the reference and is
responsible for removing it with <function>g_object_unref()
</function>.
A convenience function as ipatch_base_get_file()
does the same thing
(albeit without more specific type casting).
char * ipatch_sf2_get_info (IpatchSF2 *sf
,IpatchSF2InfoType id
);
Get a SoundFont info string by RIFF FOURCC ID.
void ipatch_sf2_set_info (IpatchSF2 *sf
,IpatchSF2InfoType id
,const char *val
);
Set SoundFont info. Validates id
and ensures val
does not exceed
the maximum allowed length for the given info type.
Emits changed signal on SoundFont.
IpatchSF2Info *
ipatch_sf2_get_info_array (IpatchSF2 *sf
);
Get all string info (not IPATCH_SF2_VERSION or IPATCH_SF2_ROM_VERSION) from a SoundFont object. The array is sorted in the order recommended by the SoundFont standard for saving.
[skip]
A newly allocated array of info structures terminated by
an array member with 0 valued <structfield>id</structfield>
field. Remember to free the array with ipatch_sf2_free_info_array()
when finished with it.
void
ipatch_sf2_free_info_array (IpatchSF2Info *array
);
Frees an info array returned by ipatch_sf2_get_info_array()
.
[skip]
gboolean
ipatch_sf2_info_id_is_valid (guint32 id
);
Check if a given RIFF FOURCC id is a valid SoundFont info id.
[skip]
int
ipatch_sf2_get_info_max_size (IpatchSF2InfoType infotype
);
Get maximum chunk size for info chunks.
NOTE: Max size includes terminating NULL character so subtract one from returned value to get max allowed string length.
[skip]
IpatchSF2Preset * ipatch_sf2_find_preset (IpatchSF2 *sf
,const char *name
,int bank
,int program
,const IpatchSF2Preset *exclude
);
Find a preset by name or bank:preset MIDI numbers. If preset name
and bank
:program
are specified then match for either condition.
If a preset 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.
sf |
SoundFont to search in |
|
name |
Name of preset to find or |
[nullable] |
bank |
MIDI bank number of preset to search for or -1 to not search by MIDI bank:program numbers |
|
program |
MIDI program number of preset to search for, only used
if |
|
exclude |
A preset to exclude from the search or |
[nullable] |
IpatchSF2Inst * ipatch_sf2_find_inst (IpatchSF2 *sf
,const char *name
,const IpatchSF2Inst *exclude
);
Find an instrument by name
in a SoundFont. If a matching 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.
IpatchSF2Sample * ipatch_sf2_find_sample (IpatchSF2 *sf
,const char *name
,const IpatchSF2Sample *exclude
);
Find a sample by name
in a SoundFont. If a sample 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.
IpatchList *
ipatch_sf2_get_zone_references (IpatchItem *item
);
Get list of zones referencing an IpatchSF2Inst or IpatchSF2Sample.
item |
Item to locate referencing zones of, must be of type IpatchSF2Inst or IpatchSF2Sample and be parented to an IpatchSF2 object. |
New object list containing IpatchSF2Zone objects that
refer to item
. The new list object has a reference count of 1
which the caller owns, unreference to free the list.
[transfer full]
char * ipatch_sf2_make_unique_name (IpatchSF2 *sfont
,GType child_type
,const char *name
,const IpatchItem *exclude
);
Generates a unique name for the given child_type
in sfont
. 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 sfont
child item from the search.
MT-Note: To ensure that an item is actually unique before being
added to a SoundFont object, ipatch_container_add_unique()
should be
used.
#define IPATCH_SF2_UNUSED_FLAG_SHIFT (IPATCH_BASE_UNUSED_FLAG_SHIFT + 3)
“author”
property “author” char *
Author of SoundFont.
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL
“comment”
property “comment” char *
Comments.
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL
“copyright”
property “copyright” char *
Copyright.
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL
“date”
property “date” char *
Creation date.
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL
“engine”
property “engine” char *
Sound synthesis engine identifier.
Owner: IpatchSF2
Flags: Read / Write
Default value: "EMU8000"
“name”
property “name” char *
SoundFont name.
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL
“product”
property “product” char *
Product SoundFont is intended for.
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL
“rom-name”
property “rom-name” char *
ROM name identifier.
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL
“rom-version”
property “rom-version” char *
ROM version "major.minor".
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL
“samples-24bit”
property “samples-24bit” gboolean
Enable 24 bit samples.
Owner: IpatchSF2
Flags: Read / Write
Default value: FALSE
“software”
property “software” char *
Software 'created by:modified by'.
Owner: IpatchSF2
Flags: Read / Write
Default value: NULL