![]() |
![]() |
![]() |
libInstPatch Reference Manual | ![]() |
---|---|---|---|---|
IpatchSF2Writer; IpatchSF2WriterClass; IpatchSF2Writer* ipatch_sf2_writer_new (IpatchSF2File *file, IpatchSF2 *sfont); void ipatch_sf2_writer_set_patch (IpatchSF2Writer *writer, IpatchSF2 *sfont); void ipatch_sf2_writer_set_file (IpatchSF2Writer *writer, IpatchSF2File *file); gboolean ipatch_sf2_writer_save (IpatchSF2Writer *writer, GError **err); void ipatch_sf2_write_phdr (IpatchFileBuf *filebuf, const IpatchSF2Phdr *phdr); void ipatch_sf2_write_ihdr (IpatchFileBuf *filebuf, const IpatchSF2Ihdr *ihdr); void ipatch_sf2_write_shdr (IpatchFileBuf *filebuf, const IpatchSF2Shdr *shdr); void ipatch_sf2_write_bag (IpatchFileBuf *filebuf, const IpatchSF2Bag *bag); void ipatch_sf2_write_mod (IpatchFileBuf *filebuf, const IpatchSF2Mod *mod); void ipatch_sf2_write_gen (IpatchFileBuf *filebuf, int genid, const IpatchSF2GenAmount *amount);
IpatchSF2Writer* ipatch_sf2_writer_new (IpatchSF2File *file, IpatchSF2 *sfont);
Create a new SoundFont 2 file writer.
void ipatch_sf2_writer_set_patch (IpatchSF2Writer *writer, IpatchSF2 *sfont);
Set the SoundFont patch object to save with a SoundFont writer.
writer : |
SoundFont writer object |
sfont : |
SoundFont patch to save |
void ipatch_sf2_writer_set_file (IpatchSF2Writer *writer, IpatchSF2File *file);
Set the SoundFont file object of a SoundFont writer. A convenience function, since ipatch_riff_set_file could also be used, albeit without stricter type casting.
writer : |
SoundFont writer object |
file : |
SoundFont file object |
gboolean ipatch_sf2_writer_save (IpatchSF2Writer *writer, GError **err);
Write a SoundFont object to a file.
void ipatch_sf2_write_phdr (IpatchFileBuf *filebuf, const IpatchSF2Phdr *phdr);
Writes a preset header into filebuf
from a phdr
structure. The
filebuf
size should be at least IPATCH_SFONT_PHDR_SIZE.
filebuf : |
File buffer to store data to |
phdr : |
Preset header structure to store |
void ipatch_sf2_write_ihdr (IpatchFileBuf *filebuf, const IpatchSF2Ihdr *ihdr);
Writes an instrument header into filebuf
from a ihdr
structure. The
filebuf
size should be at least IPATCH_SFONT_INST_SIZE.
filebuf : |
File buffer to store data to |
ihdr : |
Instrument header structure to store |
void ipatch_sf2_write_shdr (IpatchFileBuf *filebuf, const IpatchSF2Shdr *shdr);
Writes a sample header into filebuf
from a shdr
structure. The filebuf
size should be at least IPATCH_SFONT_SHDR_SIZE.
filebuf : |
File buffer to store data to |
shdr : |
Sample header structure to store |
void ipatch_sf2_write_bag (IpatchFileBuf *filebuf, const IpatchSF2Bag *bag);
Writes a preset or instrument bag into filebuf
from a bag
structure.
The filebuf
size should be at least IPATCH_SFONT_BAG_SIZE.
filebuf : |
File buffer to store data to |
bag : |
Bag structure to store |
void ipatch_sf2_write_mod (IpatchFileBuf *filebuf, const IpatchSF2Mod *mod);
Writes a modulator into filebuf
from a mod
structure. The filebuf
size
should be at least IPATCH_SFONT_MOD_SIZE.
filebuf : |
File buffer to store data to |
mod : |
Modulator structure to store |
void ipatch_sf2_write_gen (IpatchFileBuf *filebuf, int genid, const IpatchSF2GenAmount *amount);
Writes a generator into filebuf
from a genid
and amount
structure. The filebuf
size should be at least
IPATCH_SFONT_GEN_SIZE.
filebuf : |
File buffer to store data to |
genid : |
ID of generator to store |
amount : |
Generator amount to store |
migrate-samples
" property"migrate-samples" gboolean : Read / Write
Migrate samples to new file.
Default value: FALSE