![]() |
![]() |
![]() |
libInstPatch Reference Manual | ![]() |
---|---|---|---|---|
IpatchSF2Reader; IpatchSF2ReaderClass; IpatchSF2Reader* ipatch_sf2_reader_new (IpatchSF2File *file); void ipatch_sf2_reader_set_file (IpatchSF2Reader *reader, IpatchSF2File *file); IpatchSF2* ipatch_sf2_reader_load (IpatchSF2Reader *reader, GError **err); void ipatch_sf2_load_phdr (IpatchFileBuf *filebuf, IpatchSF2Phdr *phdr); void ipatch_sf2_load_ihdr (IpatchFileBuf *filebuf, IpatchSF2Ihdr *ihdr); void ipatch_sf2_load_shdr (IpatchFileBuf *filebuf, IpatchSF2Shdr *shdr); void ipatch_sf2_load_bag (IpatchFileBuf *filebuf, IpatchSF2Bag *bag); void ipatch_sf2_load_mod (IpatchFileBuf *filebuf, IpatchSF2Mod *mod); void ipatch_sf2_load_gen (IpatchFileBuf *filebuf, int *genid, IpatchSF2GenAmount *amount);
IpatchSF2Reader* ipatch_sf2_reader_new (IpatchSF2File *file);
Create a new SoundFont file reader
file : |
SoundFont 2 file object to parse or NULL to set later
|
Returns : | The new SoundFont file reader |
void ipatch_sf2_reader_set_file (IpatchSF2Reader *reader, IpatchSF2File *file);
Set the SoundFont file object of a SoundFont reader. A convenience function, since ipatch_riff_set_file could also be used, albeit without stricter type casting.
reader : |
SoundFont reader object |
file : |
SoundFont file object |
IpatchSF2* ipatch_sf2_reader_load (IpatchSF2Reader *reader, GError **err);
Load an SF2 file.
reader : |
SF2 reader object |
err : |
Location to store error info or NULL
|
Returns : | New SF2 object with refcount of 1. |
void ipatch_sf2_load_phdr (IpatchFileBuf *filebuf, IpatchSF2Phdr *phdr);
Parses a raw preset header in filebuf
into a structure.
filebuf : |
File buffer containing raw data |
phdr : |
Pointer to a user supplied preset header structure |
void ipatch_sf2_load_ihdr (IpatchFileBuf *filebuf, IpatchSF2Ihdr *ihdr);
Parses a raw instrument header in filebuf
into a structure.
filebuf : |
File buffer containing raw data |
ihdr : |
Pointer to a user supplied instrument header structure |
void ipatch_sf2_load_shdr (IpatchFileBuf *filebuf, IpatchSF2Shdr *shdr);
Parses a raw sample header in filebuf
into a structure.
filebuf : |
File buffer containing raw data |
shdr : |
Pointer to a user supplied sample header structure |
void ipatch_sf2_load_bag (IpatchFileBuf *filebuf, IpatchSF2Bag *bag);
Parses a raw preset or instrument bag in filebuf
into a structure.
filebuf : |
File buffer containing raw data |
bag : |
Pointer to a user supplied bag structure |
void ipatch_sf2_load_mod (IpatchFileBuf *filebuf, IpatchSF2Mod *mod);
Parses a raw modulator in filebuf
into a structure.
filebuf : |
File buffer containing raw data |
mod : |
Pointer to a user supplied modulator structure |
void ipatch_sf2_load_gen (IpatchFileBuf *filebuf, int *genid, IpatchSF2GenAmount *amount);
Parses a raw generator in filebuf
into a ID and amount.
filebuf : |
File buffer containing raw data |
genid : |
Pointer to store the generator ID in |
amount : |
Pointer to a generator amount to store the amount in |