IpatchSF2Reader

IpatchSF2Reader — SoundFont file reader.

Synopsis




            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);

Object Hierarchy


  GObject
   +----IpatchRiffParser
         +----IpatchSF2Reader

Description

An object for loading a SoundFont file to an IpatchSF2 object.

Details

IpatchSF2Reader

typedef struct _IpatchSF2Reader IpatchSF2Reader;


IpatchSF2ReaderClass

typedef struct {
  IpatchRiffParserClass parent_class;
} IpatchSF2ReaderClass;


ipatch_sf2_reader_new ()

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

ipatch_sf2_reader_set_file ()

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

ipatch_sf2_reader_load ()

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.

ipatch_sf2_load_phdr ()

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

ipatch_sf2_load_ihdr ()

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

ipatch_sf2_load_shdr ()

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

ipatch_sf2_load_bag ()

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

ipatch_sf2_load_mod ()

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

ipatch_sf2_load_gen ()

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