[Flac-dev] Compressing sound fonts with FLAC
Josh Coalson
xflac at yahoo.com
Wed Feb 14 16:17:55 PST 2001
--- Josh Green <jgreen at users.sourceforge.net> wrote:
> I stripped out all non-audio data from a few fonts
> (which doesn't
> usually amount to much, 50k in a font with a lot of
> preset/instrument/sample overhead information). I
> managed to save a good
> 20k by gzipping this data and not making FLAC
> compress it. Not that much
> for all the effort. Although I noticed that FLAC
> didn't do very well
> with the non-audio data (I didn't expect it to), so
> I do like the idea
> of separating this data and gzip/bzip'ing it.
>
yeah, flac doesn't have a 'gzip' fallback method
so any non-audio data will probably get stored
verbatim. I'm kind of reluctant to add a generic
compressor. If you wan't, you could come up with a
FLAC metadata block to store a gzip'ed chunk and I
could add that to the format.
> I think I can save more data by concentrating on the
> audio.
> The sample chunk in a sound font is composed of many
> samples, all 16 bit
> word aligned. Each sample can have its own sampling
> rate. These samples
> appear one after the other, each with 46 '0' pad
> samples at the end. I
> can see that this might not be optimal for FLAC.
> Any ideas of how to get FLAC to better compress
> these back to back
> samples?
>
the best thing would be to try and set the blocksize
to match the length of the individual 'sample'. if
each sample is much shorter than the blocksize then
the encoder may not be able to generate an efficient
model of the signal. if the samples within the
soundfont vary greatly in length that also makes
it harder because right now flac only supports a
fixed blocksize (even though the format allows for a
varying blocksize).
Josh
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
More information about the Flac-dev
mailing list